Step 6. Deploy

This page shows you how to deploy. Deploy means: Deployment Manager sends the bundle to every server of the installation over SSH, and runs the installer there. The page follows the deploy from when you press Deploy until every service is up.

Before you start

This section lists what must be ready before you deploy.

  • The installation has its servers bound and every variable answered. See Step 2. Create an installation and Step 3. Fill in the variables.

  • Deployment Manager can reach every server over SSH. The card shows this. See SSH access.

  • You tested the bundle. This is recommended before a first delivery. See Step 5. Test the bundle.

  • You have somewhere safe to keep passwords. The tool can generate secrets. After the deploy, they exist only in .env on the servers.

  • The SSH login can run docker or use sudo without a password, or it is root. See Which login works.

The server may have no SSH route from Deployment Manager. Then use ↓ Download instead and carry the bundle to the site. See Step 4. Create the bundle. From a Windows jump host, see From a Windows jump host.

For the product words on this page, see the glossary.

Steps to run one deploy

This section shows how to run one deploy from the Installations tab.

  1. Open the Installations tab.

  2. Find the card of your installation. Press Deploy.

  3. The dialog Deploy (installation name) - where it goes opens. It shows what the panel found on each server. Read it. See Before anything is copied.

  4. Press Continue →.

  5. The panel may ask you to apply database migration steps by hand first. It does this only for a database you run yourself. Run the SQL from the bundle. Type applied. Press Continue →.

  6. The secrets step opens, if the deploy needs secrets. Type each secret. Or press Generate where it is offered.

  7. Press Copy all values. Keep the values somewhere safe. After the deploy you cannot see them here again.

  8. Press Deploy →. The deploy starts. The panel shows its progress live. See What you see while it runs.

  9. Wait. Each server that finishes shows deployed. When the whole deploy succeeds, the screen Installed - (installation name) opens.

  10. Go to Step 7. Check that it works.

When a deploy over an existing installation succeeds on every server, the card marks the installation as installed. The field Version already installed then shows the version that you just deployed. The next bundle upgrades over this version. See the installed version.

Maybe the screen filled in a value that you did not copy. Then, if you deploy or close the window, the panel shows the dialog Deploy (installation name) - save the passwords first. Press Copy all values there, and keep the values somewhere safe.

Before anything is copied

This section lists what the panel checks before the deploy starts. The panel first reads every bound server. It reports two things about each one. Nothing is copied or run before that. A port that two services of the installation open on one server is refused here. The panel shows Port <number> is used twice on <server> and the button Close. Change one port on the Variables step. See A port used twice on one server. The readiness checks, such as a busy port, come later: they run on the server after the bundle is copied. See the readiness checks. You can run the same checks earlier, on the Server check screen. See Check the servers before you install.

What the install directory currently holds:

State What it means

Empty

Nothing is installed here. This will be a fresh install.

Ours

This installation is already here. It will be updated in place.

Occupied by another of our servers

The directory holds a different server from this tool. Two servers cannot share a directory. The panel offers its own directory instead, and tells you. Commands that expect the standard directory will not find the install there.

Occupied by an installation this tool did not create

The same offer and the same warning. Here the directory is one this tool has no record of.

Could not be read

The panel could not reach the server. The deploy cannot start until every server answers. Check SSH access, then open Deploy again. If the server answers but one directory cannot be read, the panel offers its own directory instead.

What the server is missing:

State What it means

Docker not installed

The deploy cannot run here until Docker is installed.

Compose v2 plugin missing

Docker is present, but docker compose is not. Install the plugin and try again.

The offered directory may not be the standard one. Then the panel shows a warning. Every guide, runbook and support script assumes /usr/local/ft-system. If a deploy used another directory, give that path wherever you use those documents.

When the deploy panel cannot reach a server

This section explains the server-reach check at the top of the deploy panel. The deploy runs over SSH. So the panel first asks every server to answer over SSH.

What the deploy panel says What it means

The server answers over SSH.

The one server answered. You can continue.

All <n> servers answer over SSH.

Every server answered. You can continue.

Checking the servers…

The panel is still asking. Wait.

Could not check the servers. You can continue; the deploy stops at the first server it cannot reach.

The panel got no clear answer. This is not a stop.

Cannot reach the server

One server did not answer. Continue → is blocked.

Cannot reach <n> of <m> servers

Some servers did not answer. Continue → is blocked.

When a server does not answer, the panel says: "The deploy runs over SSH, so it cannot start until every server answers." Under this sentence it lists each server that did not answer. Each line shows the server id, the address that the panel tried, and the cause.

Under the list, the panel says: "If the hostname is not in DNS, enter its IP address there." Then it shows the button Edit addresses. To fix a wrong or unknown address:

  1. Press Edit addresses. The deploy window closes. Nothing has been sent to any server.

  2. The installation opens on its servers step. Correct the address of the server. Use its IP address if its name is not in DNS.

  3. Open the Installations tab again. Press Deploy on the card.

The text under the button says the same: "Opens the installation. This window closes; nothing has been sent."

Containers that are not part of this installation

This section explains what the panel does when a server already runs containers that this deploy would touch. The panel lists the containers on each server. It does this before it copies anything. The check uses the install directory and the Compose project of that server.

The Compose project is a name that groups the containers of one installation. Each server row has a Compose project field. It follows the directory field until you change it.

  • A new install gets the name of the install directory. For example, /data/ft-system gives ft-system. The panel changes capital letters to small letters and removes other characters.

  • An existing install keeps the name that it has now. The panel does not rename it for you.

  • If the directory name gives no usable name, type a name yourself. A name uses small letters, digits, _ and -. It starts with a letter or a digit. It has at most 63 characters.

  • The install directory uses only letters, digits, ., _, - and /. It starts with /. Spaces and non-ASCII characters are not allowed.

The panel sorts what it finds into four cases.

Case What the panel shows What you do

Containers of the same project are in another directory, or the directory holds containers that this tool cannot prove are its own

A red message. It names the server, the directory and each container with its service and its source directory. Continue → is refused. You cannot confirm your way past it.

Choose another directory or another project name. Then the message goes away.

Our own install runs under another project name

A red message, unless you tick "Rename this installation’s project from X to Y (its containers restart; data is kept)".

Tick the box if you want the rename. Otherwise change the project name back to X.

Our own containers are in the directory, and this bundle has no service for them (for example mysql after the topology changed to Customer’s own)

An amber message. It says the containers are removed and their data on disk is kept. There is one box for each service, named "Remove <service>" (for example "Remove mysql"). A tick is required.

Tick the box "Remove <service>" for each service. Without the tick Continue → stays blocked.

The panel could not list the containers

A neutral note: "could not list the containers; the installer checks again before it changes anything".

Nothing. The installer checks again on the server and removes nothing it cannot prove is ours.

The installer on the server makes the same checks again. This covers a retry, a bootstrap run and a run by hand. It never removes a container that it cannot prove is ours.

A rename. The tick names the old project. The installer lists the containers again right before it starts the new ones. It removes only the old containers of this install. Their data is kept. If the installer cannot list the containers at that point, it stops the rename.

Failure codes. If a check fails, nothing is removed. Nothing is copied when the panel finds the problem first. When the installer finds it, the new files may already be in the directory.

Code What it means What you do

foreign_containers

A container uses the compose project of this install, but it is not proven to be ours. The message names the container and the directory it came from.

Choose another directory or another project name. If the containers are old services of this installation, remove them by hand with docker rm -f <names>. Then deploy again.

project_name_changed

The project name that you chose differs from the name of the running install, and you gave no consent for a rename.

Use the old name again. Or deploy from the panel and tick the rename box.

retire_not_accepted

Containers of this install have no service in this bundle, and you did not accept their removal. The message names each service.

Tick the removal in the panel and deploy again. By hand, add --retire <services> or --retire all.

An example of the foreign_containers message:

FAIL foreign_containers|cust_mysql (mysql, from /data/ft-system) uses the compose project ft-system that /usr/local/ft-system would use; nothing was removed - choose another directory or --project-name.

Card retry. A retry never removes containers silently. If the retry fails with retire_not_accepted, the failure view shows the button "Retry and remove <names>". The names are the ones in the failure sentence. Press it to remove them and run again. A retry never carries a rename. Finish a rename from Deploy.

Every deploy also runs readiness checks on each server. They run after the bundle is copied, but before any container is started or stopped. See the readiness checks.

Which login works

This section explains what the SSH login may do on a server. The installer checks this on every server first. It checks before it copies anything and before it asks for secrets. The same rules apply in three cases: the Deploy button, an install from a Linux jump host, and an install from a Windows jump host. See From a Windows jump host.

The login can What the installer does How to give this to a login

Be root

Works. All steps run as root.

Log in as root.

Run docker (member of the group docker)

Works. All steps run as the login. If the install directory does not exist, the login must be able to create it.

As root, run usermod -aG docker <user>. The user logs out and in again.

Use sudo without a password

Works. The installer copies the files as the login. It runs only the install step of that server with sudo -n. If the login cannot write the install directory, the installer copies the server’s files to a private directory /var/tmp/ft-stage.XXXXXX first. Root installs from there. The installer removes this directory at the end of the install, also after a failure. At the start of a run it also removes old staging directories. It removes only those that belong to the login, have mode 0700, are named like ft-stage.XXXXXX, and are older than 24 hours.

As root, run visudo -f /etc/sudoers.d/ft-install and add the line <user> ALL=(ALL) NOPASSWD:ALL. Delete the file after the install.

Use sudo only with a password

Stops with insufficient_privilege. Nothing was changed. The installer cannot type a sudo password.

Allow passwordless sudo as in the row above, or use root, or use the group docker.

None of these

Stops with insufficient_privilege. Nothing was changed.

Use root, add the login to the group docker, or allow passwordless sudo.

The login also needs to write the install directory (/usr/local/ft-system by default). A login in the group docker has no sudo. If that login cannot write or create the directory, the install stops. To fix it, as root run these two commands:

mkdir -p /usr/local/ft-system
chown <user> /usr/local/ft-system

Some servers say that sudo needs a terminal (requiretty). A background install has no terminal. Allow it for the login. As root, run visudo -f /etc/sudoers.d/ft-install and add the line Defaults:<user> !requiretty.

The sentences the installer prints for each cause are in the troubleshooting page.

If a path can be changed by other accounts, the installer does not run it as root. This also applies to an install path that passes through more than one symlink. It applies to a path under a shared directory with the sticky bit, such as /tmp, when the last name does not exist yet. The installer refuses such a path for the sudo rows and for the private staging directory. Unpack the archive in a private directory. See Carry the bundle to a server by hand.

What you see while it runs

This section explains what the panel shows during the deploy. The panel shows a step list and a transcript together, live. After docker compose up -d returns, there is one row per service. Each row shows one word for what the service is doing:

Word Meaning

starting

Normal. After about three minutes the row also shows how long it has been starting. This is still not a failure. It means this service is slower than usual.

ready

Reporting healthy.

stopped

The container exited.

unhealthy

Running, but its health probe is failing.

restarting

Docker is restarting it repeatedly.

When every step for a server finishes, the server’s result is one of deployed, failed, or not attempted. Not attempted means the run stopped on an earlier server before it reached this one. Sometimes the panel cannot check the server itself. Then the reason is one of two: the server could not be reached, or the server refused the stored credentials.

Where the service rows come from. Docker Compose itself reports them. A container renamed by hand can stop the short progress note under the current step from updating. Check the container directly on the server before you decide.

The tabs of the deploy panel

This section explains the tabs of the deploy panel. The panel has one tab named All servers and one tab for each server. All servers opens first. It shows one row for each visit of a server, its state, and the one line that is live now. Press a server tab to read the step list and the transcript of that server.

Each tab shows one word for its server:

Tab word Meaning

waiting

The server has not started yet. An earlier wave must finish first.

running

The installer works on this server. If the install has waves, the word is wave and a number, for example wave 1.

deployed

The installer finished on this server.

failed

The installer stopped on this server. Read the step marked failed.

not attempted

The run stopped on an earlier server before it reached this one.

The word deployed is a claim about the deploy only. It does not say that the customer site works. Use Step 7. Check that it works for that.

Closing the deploy panel

This section explains the questions that the deploy panel asks when you close it. Closing the panel stops you watching the deploy. It does not stop the deploy.

While a run is active, the panel asks before it closes. Its text says, for example, "The install keeps running on (server)." and "Closing stops watching it, and the log is not kept. The installation shows how it ended." Choose one button:

  • Keep watching: the panel stays open.

  • Close anyway: the panel closes. The run continues on the server.

After a run failed, the panel asks "The log of this run is not kept." It adds: "Once this window closes, the transcript is gone. The record of what failed stays on the installation." Choose one button:

  • Download it first: the panel offers the transcript as a file. Save it, then close.

  • Close without it: the panel closes and the transcript is gone.

If you open a run again later and its transcript is gone, the panel says: "The log of that run is not kept - this is what the record says."

How long Deployment Manager keeps a deploy run to watch

This section gives the time limits for watching a deploy again. Deployment Manager keeps the lines of a deploy run in its memory.

  • While the deploy runs, open the installation again. The deploy panel opens on the running deploy. It shows every line so far, then the new lines live.

  • After the deploy ends, the lines stay for 30 minutes. A panel that lost its connection gets the missed lines back in this time.

  • Opening the installation after the deploy ended does not open the old run. The result stays on the installation card.

  • After 30 minutes, or after a restart of Deployment Manager, the lines are gone. A request for them gets this answer: "No deploy of this installation is running here, and none finished in the last 30 minutes."

  • The connection to a server can drop during a deploy. Deployment Manager then tries to connect again for 15 minutes. deploy.sh keeps running on the server. After 15 minutes the run ends with lost_contact. See Other failure codes of a deploy.

An administrator can change both times. They are the settings DEPLOY_RUN_KEEP_S (default 1800 seconds) and DEPLOY_RECONNECT_WINDOW_S (default 900 seconds). See the environment variables.

When the configuration files are not available

This section explains the dialog that can open when you press Deploy. The dialog is Configuration files are not available yet or Configuration files are too large. Nothing was sent to any server.

Dialog title What it means What you do

Configuration files are not available yet

Deployment Manager could not get the configuration files of one or more services. The cause is usually temporary.

Press Try again after a minute. Or press Deploy with the current files. The bundle then uses the newest files that Deployment Manager has. They can be from an older version, so read the warning before you use the bundle.

Configuration files are too large

The configuration folder of a service is larger than Deployment Manager accepts. Asking again does not change this.

Ask the team that owns the service to make its configuration folder smaller. Or press Deploy with the current files.

If both cases happen together, the dialog uses the title Configuration files are not available yet. It marks the services that are "not received" and the service that is too large. Press Cancel to deploy nothing.

How long a deploy takes

This section gives the normal time of a deploy. The wait for services to report healthy has a limit of ten minutes per server. A three-server install that pulls images and then waits can take half an hour. This is normal.

Pinned versions: refusals and warnings

This section explains what the deploy panel says about pinned image versions. A pin is the exact build of a version. See Pinned versions: the exact build of each image.

A deploy that is refused

If a version has no pin, the deploy does not start. The panel names each service and tag. Nothing is copied to any server. Do this:

  1. Open Plan, then Versions.

  2. Click Pin these versions.

  3. Start the deploy again.

The panel can also show these refusals. Each has its own next step:

Refusal What you do

image_pin_unavailable (503)

DM could not reach the registry. Check the connection and the Harbor login in Settings. Try again.

image_tag_not_in_registry (409)

The registry has no build of that version. Choose another version on Versions.

image_pin_running (409)

DM is already pinning this installation. Wait, then try again.

image_pins_read_only (400)

Only a script that sends image_pins sees this. Remove image_pins from the request.

The full text of each refusal and the call for scripts are in the bundle page.

A warning before the deploy

Before it pushes the bundle, DM asks the registry again for the build of every pinned tag. The panel shows a warning if the answer is not the pinned build. The deploy still runs. It installs the pinned build.

Warning What it means

image_pin_drifted

The tag now points to another build. The panel shows both short digests. To use the new build, click Take the new build in Plan, then deploy again.

image_pin_unchecked

DM could not ask the registry. Nothing is known about the tag. You can deploy. The pinned build is installed.

A script that calls the API gets the same warnings in two places:

  • the X-Pin-Warnings header of a download. It holds a JSON list with at most 24 entries.

  • a notice event in the live stream of a deploy

Deploy waves: why a second server waits

This section explains deploy waves. Two servers can depend on each other in a cycle. For example, host 1 needs something on host 2, and host 2 needs something on host 1. Then the deploy is split into waves. A wave is a set of server visits that must happen in a fixed order. The tool calculates the waves from the service dependencies. Nobody enters them by hand. See Step 1. Choose a topology for how a topology produces waves.

Before the run starts, the panel states the plan in one line. It names every wave and the servers in it. For example: "deploying 3 server(s) in 2 waves, each waiting for the one before — wave 0: db-host; wave 1: host1, host2". A plan with one wave has no such line.

During the run, the transcript marks the start of each wave for its server. A host may be visited more than once. Then the step list and the roll-call label each visit with its wave (host1 · wave 1). A host with no cycle in its plan has one visit. A host that runs only services with no wave dependency is deployed last. It is labelled no wave. It is not added to wave 0.

A server’s second visit does not copy the bundle again. It does not change the environment file again. The transcript says so. So its step list is shorter than on the first visit. This is normal. It does not mean the install was skipped.

In one wave, the servers install at the same time. The next wave starts only when every server in this wave has finished. If a server fails, the other servers in the same wave still finish. Then the run stops. Every server in the later waves is not touched. It is reported as not attempted. A server that failed has something on it to check. A server that nobody reached has nothing.

Deploy waves when you run deploy.sh on a server by hand

This section explains the wave options of deploy.sh --mode local. A server can be in more than one wave. Then start one wave at a time with --wave <n>. The transcript names the next wave and the server for it.

  • Without --wave, such a server is refused. The script names the next wave and prints the command for it. Nothing is changed.

  • On a terminal, the script then asks "Start the whole host anyway?". The default is n. Answer y only if you want all waves of this server at once.

  • Without a terminal, the run stops with wave_needed and exit code 3. To start the whole server on purpose, add --all-waves.

  • The file .ft-wave-completed in the install directory records the waves that finished. A second run skips them and goes on with the next wave.

  • To run a finished wave again, add --from-wave <n>.

A server in one wave, or in no wave, is never refused.

Deploying over an existing install

This section explains a deploy into a directory that already holds this installation. For the full update steps, see Update an existing installation.

The panel reports such a directory as ours. This is the normal case. A new deploy is how these changes reach a server that already has the installation:

  • a topology change

  • a variable edit

  • a new release version

Two things happen that a first install never has.

The .env files are merged, never replaced. The host .env and every <service>/.env already in the directory stay in place. Nothing is asked. For each variable this deploy would write:

On the server What happens

The variable is missing

It is added at the end of the file. A line above it says the installer added it.

The value was edited on the server

The server’s value stays. The deploy log names the variable, never its value.

The value is what Deployment Manager wrote last time, and it has since been changed in Deployment Manager

The new value replaces it. The installer knows this from a copy of what it delivered last, .env.delivered, kept next to each file.

A secret (a password, key or token)

The server’s value always stays. The database was created with the old password. A different password would not work with it. Every service would then fail to sign in.

A variable this version no longer reads

It stays, and the log names it. You must move a value under an old name by hand.

A secret on the server is never overwritten. So the Deploy form does not ask for a secret that every server needing it already has. It names those secrets instead. A server may turn out not to have it. Then the installer stops at its own secrets check, before anything starts.

When a file changes, the old version is kept next to it as .env.previous. The first deploy after this behaviour was released has no .env.delivered to compare with. So it only adds variables and changes none.

The warning deploy.sh prints before starting services. A database creates its accounts and schemas only on the first start with an empty data directory. On a new deploy, the data directory already exists. Those accounts do not change, whatever password is now in .env. deploy.sh prints a WARN block about this for each database that already holds data, right before it starts the containers. A deploy may later fail with the database refused the credentials. The cause is almost always this: the database still expects the old password, not the one you just typed. See Whose failure is it?.

Configuration files that were edited on the server. The .env merge above applies to the .env files. All other configuration files in the bundle get a simpler version of the same protection. Examples: application settings, certificates, database init scripts. It works the same way for all three ways a bundle reaches a server:

  • the panel’s Deploy

  • deploy.sh --mode bootstrap run by hand

  • an offline install from a carried archive

Before anything is copied, each file on the server is compared with what the last deploy wrote there:

What is found What happens

The file still matches what was last written

Nobody changed it. It is replaced with the new one. The old file is kept next to it as <file>.previous.

The file differs

Somebody edited it on the server. It is left as it is, and the deploy log names it. The deploy continues and installs everything else.

This is the first deploy after this protection shipped

Nothing is recorded yet to compare with. So every existing file is kept. The log says this once, as a count. The comparison works from this installation’s next deploy onward.

The server’s own state could not be read

Nothing is changed, and the log says so. This is the safer choice when the comparison itself cannot be trusted.

A service’s own contract can override the comparison for a specific file with config_policy:. It has two values:

  • keep: never write over the file, whatever the comparison says. Use this for a certificate or key a customer supplies.

  • replace: always write our file, even if the server’s file is different.

This keep is a rule of a service contract. It is not the Keep button of an upgrade review. For a compose file that the upgrade does not use, see the questions the script asks on the server. When a user chooses Keep and an admin has not approved it, the script asks on the server. The answer No stops the run before any change.

There is no merge. If a file needs more than keep or replace, raise it as a case. It is not a setting you can choose.

This does not cover the everyday case of changing a value and deploying again. Configuration files never contain values you typed. Those values are in .env, which the section above covers.

An update to a newer product version can include schema migrations that run in order. You decide this earlier, in the installation wizard’s own step for it. See Step 3. Fill in the variables and Update an existing installation.

Questions the upgrade asks

This section explains the questions that deploy.sh asks during an upgrade of an installation that DM brought in. See Bring an existing installation under Deployment Manager. deploy.sh asks only what nobody decided in DM. It asks before it changes anything.

Question When it is asked What the answer does

Continue?

Once for each step that cannot be undone, when an administrator already consented in DM.

Yes runs the step. No or Ctrl-C stops with nothing changed. Run the same bundle again to be asked again.

Do you have your own backup of this data, taken just before this upgrade?

A step cannot be undone, and DM cannot back up its data.

Yes goes on. No stops with nothing changed.

Has your own backup been made?

Our backup of the database failed, and an administrator allowed your own backup.

Yes goes on, and DM records the reason. No stops with nothing changed.

Has a backup of this server been made?

The backup answer is not set on the upgrade review page.

The answers are: a backup has been made, make one now, or continue without a backup. The last answer is recorded.

The last attempt was force-stopped. Continue it?

The last run of this bundle was stopped hard.

Yes continues that attempt. No stops. Collect the inventory again to get a new bundle.

Take this server over (write its server id)?

You left Start managing every server without asking me first off on the Review step of the import. DM checked every server first and asks before it changes any.

Yes marks the server as managed by DM.

Leave container <name> running and never touch it?

A container on the server is not part of the topology, and nobody decided about it.

Yes leaves it as it is.

Use the value found on the server for <secret>?

DM proposed a source for a secret, and nobody confirmed it.

Yes reads the secret from the server.

Who may answer in the DM panel.

  • Anyone with write access to the installation answers the take-over, the container, the secret and the dropped-mount questions.

  • The person who started the run answers the backup, Continue?, own-backup and force-stop questions. A support admin or a global admin can answer them too.

  • Only a support admin or a global admin approves a step that cannot be undone. The screen says Approve. This page and deploy.sh also call the approval a consent. See Upgrades that cannot be undone.

No answer on the command line gives that consent. The flag --consent never grants a step that cannot be undone.

Answering in advance. On the upgrade review page, answer the question before you start the run. For a step that cannot be undone, an administrator presses Approve. The bundle then carries the answer. By hand, add the flag --consent <code> or --consent-for <server>=<code>. The line ft-need in the output names each code.

An unanswered question.

  • On a terminal, deploy.sh asks when the run reaches the question.

  • Without a terminal, deploy.sh stops with exit code 6. Nothing is changed. The ft-need lines name each question. Run again on a terminal, or answer in advance.

  • In the DM panel, the run waits for the answer. If nobody answers in 30 minutes, the run stops before it changes anything. While it waits, deploy.sh prints ft-wait q8s=<open> left=<seconds> every 60 seconds: <open> is the number of questions not answered yet, <seconds> the time left.

  • A run with --tabs --plain has a time limit for the backup question. An example is the terminal of a Test install. The question waits 900 seconds (15 minutes). It shows "Answer 1, 2 or 3:". If nobody answers, the script says "nobody answered within 15 minutes on this terminal, so the backup question stays open." Then it stops with exit code 6. Nothing is changed.

When deploy.sh stops with exit code 6, it prints one ft-need line for each open question. Then it says: "These questions need an answer before the run can go on. Nothing has been changed on any server yet." Under each question it names the flag that answers it. For the backup question, this is "answer it with: --backup-made, --make-backup or --no-backup". For the other questions, this is --consent-for <server>=<q8>.

Question cards in the deploy panel

This section explains the question cards that the deploy panel shows during an upgrade. The title above the cards is "The upgrade is waiting on a question" or "The upgrade is waiting on <n> questions". The cards are grouped by server. Each card shows:

  • the question

  • the time left, for example "29 min left" or "less than a minute left"

  • what Allow does, in one sentence

  • the buttons Allow and Stop

Stop is open to everyone. It never changes the server. The run stops before it changes anything. When the time is up, the card says "time is up - the run stops here without changing anything".

Question on the card What Allow does Who may allow

Take this installation over?

DM writes its server id there and manages this installation from now on.

Anyone who may deploy

Leave this container running and never touch it?

The container is left running and never touched; it is recorded as not managed by this installation.

Anyone who may deploy

Use the value found on the server for this secret?

The value found on the server is used for this secret; it is never shown.

Anyone who may deploy

Recreate the service without this?

The service is recreated without this mount, port, flag, network or name.

Anyone who may deploy

Keep the edited file, or replace it with the new release’s?

The upgrade continues without this compose file: the services it adds settings to start without them.

Anyone who may deploy

Allow a change that cannot be undone?

The consent is recorded, the backup is taken and the change is made; it cannot be undone.

Administrator only

An administrator consented to this step. Run it now?

The step an administrator consented to runs now.

The person who started the deploy, or an administrator

Has your own backup been made?

The run continues without its own dump: your backup is the way back.

The person who started the deploy, or an administrator

Our backup could not be made. Has your own backup been made?

Our backup could not be made; the run continues on your own backup.

The person who started the deploy, or an administrator

The last attempt was force-stopped. Continue it?

The force-stopped attempt is continued.

The person who started the deploy, or an administrator

The backup question has three buttons instead of Allow. The question is "Before anything is changed: has a backup of this installation been made?" The person who started the deploy, or an administrator, answers it.

  • Yes, a backup has been made: a backup exists. The run goes on.

  • No - make one now: the run dumps the databases first.

  • No - continue without a backup: the run continues without a backup. This is recorded.

Here, administrator means a support admin or a global admin. When you may not allow a question, the card says why. The sentences are "Only an administrator can allow this." and "Only the person who started this deploy, or an administrator, can answer this."

The card can refuse your answer with one of these sentences:

  • "The run is no longer waiting on this question." Someone else answered, or the run went on.

  • "That answer does not fit this question."

  • "Only an administrator can allow this. Your answer was not recorded."

Upgrades that cannot be undone

This section explains the steps that you cannot undo. An example is a change of the version of a database engine. After the change, the old engine version cannot read the data again.

DM finds these steps before it makes the bundle. The upgrade review page lists them. Its text says, for example, "1 database upgrade can’t be undone". Each row names the service and the versions: from, and to.

  1. Open the upgrade review page of the installation.

  2. Read each row.

  3. Ask an administrator to press Approve, for example Approve 1 step. A support admin or a global admin can approve.

Remember these rules:

  • DM makes the bundle only after the approval. If a step has no approval, Download and Deploy open the upgrade review page.

  • An approval belongs to one step and one version of the bundle. If you change an input, the approval no longer counts. The page says, for example, "1 approval no longer counts" and gives the reason. The row says: "Approved before the settings changed. Approve it again." An administrator approves again.

  • DM saves the name of the person who approved. The dialog says: "Your name is saved with this approval."

  • The backup is the only way back for the data. See Rolling back an upgrade.

On the server, deploy.sh asks Continue? once for each consented step. See Questions the upgrade asks.

Stopping a deploy

This section explains Stop, Force stop and Continue for an upgrade. Use them when the run must end early.

Stop

Stop ends the run at the next safe point. Nothing is undone. The safe points are:

Point Where the run is

P0

At the questions, before anything was changed.

P1

After the checks, before the safety copy of the site files.

P2

After the backups, before any new file is put in place.

P3

After the new files are in place, before any container is recreated. These services still run the old version.

P4

After a wave came up.

P5

After the state after the upgrade was recorded.

Some steps cannot be interrupted safely. They are a database dump, the file copy, the database migrations, and the start of a database. A Stop waits for such a step. The panel says Stopping after and the step. The script prints: "Stop requested - waiting for …​ to finish; it cannot be interrupted safely."

You can stop in three ways:

  • In the DM panel, press Stop.

  • At a terminal, press Ctrl-C once.

  • By hand, create the file .ft-adopt/stop in the install directory: : > <install dir>/.ft-adopt/stop.

The run ends with exit code 4. It prints: "Stopped after …​ Nothing was undone. Run the same bundle again to continue from here."

Force stop

Force stop ends a step that a Stop waits for. The panel offers it only while a step cannot be interrupted safely. The person who started the run or an administrator can press it. At a terminal, press Ctrl-C a second time. By hand, run this on the server:

deploy.sh --force-stop --install-dir <install dir>

The command signals the run only if .ft-adopt/run.pid still names it. Otherwise it prints "the run is no longer there" and signals nothing. It sends TERM, and KILL after 10 seconds.

What a force stop leaves:

The step What is left

A backup

The incomplete backup file is deleted. The next run takes it again.

The start of a database

A database was starting. Check it before you continue.

The file copy

Some of the new files may be in place and some not.

The database migrations

Nothing interrupts them. A migration that stops half-way leaves the database half-changed. A force stop waits for the migrations to finish. Then the run stops. The script prints: "The database migrations cannot be interrupted safely, not even by a force stop."

A force stop ends with exit code 5. The next run of the same bundle asks The last attempt was force-stopped. Continue it? Check the database first. Restore it from the backup if needed.

If your terminal or connection closes, the run gets a HUP signal. Between steps, it works like a stop request. Inside a backup or a database start, it works like a force stop. During the migrations, it is only a stop request.

Continue

Continue runs the same bundle again from where it stopped. Press Continue in the panel. By hand, run the same bundle again.

  • Steps that are done are not repeated.

  • Finished backups are kept.

  • Waves that are done are skipped.

Rolling back an upgrade

This section explains how to put the previous state back. Only files and containers go back. The data does not go back. Only your database backup brings the data back.

Before the upgrade changes anything, it saves the site files in .ft-adopt/original-<version>.tar. The rollback uses this file. On the server, run:

deploy.sh --rollback --install-dir <install dir>

The command asks Roll back? Answer yes. Without a terminal it cannot ask. Then add --rollback-yes. The rollback works on one server at a time.

The command refuses in these cases:

  • A run is still going. Stop it first, or wait until it ends. Then run --rollback again.

  • The previous image is not on the server. Load it with docker load. Then run --rollback again.

If the upgrade carried an anonymous Docker volume, the old container gets a new empty one. The data stays on the host.

In DM, the rollback button of the panel runs this rollback for an installation that was brought in. It asks: "Roll back to the state before the last upgrade. Files and containers go back; data changed by the upgrade does not - restore the database backup for that. Roll back?"

For the rollback of the .env file only, see Rolling back the .env.

If a deploy fails: where to read the reason

This section explains what to do when a deploy fails. The full failure-code reference is in When something goes wrong. It lists every message the panel can show and what to do about each one.

Reading the failures of an upgrade

This section explains four messages that you can meet in an upgrade of an installation that DM brought in. Each message shows a code and a sentence. Read the sentence first.

Code and sentence What it means What you do

engine_not_upgraded: the database engine still runs the old version after the upgrade

An administrator consented to a change of the engine version. After the run, the engine still reports the old version. The usual cause is a Dockerfile of the site that the installer kept. It is still built FROM the old version. The containers were recreated. The backup is on the server. Usually the check before the upgrade finds such a file first and stops before anything changes. This message is for the case that the check could not see.

Read the sentence under the code. It names the file and the line, for example FROM mysql:8.0 to FROM mysql:8.4.6. Change it on the server. Or tell DM to replace that file with its own, and make the bundle again. Then run the same bundle again.

secret_invalid: a secret value contains a single quote (or, in a MySQL password, a double quote or backslash) and cannot be written into the .env file; nothing was changed

A secret holds a character that the .env file cannot keep safely. The installer checked before it wrote anything.

Use a value without those characters. The sentence names the variable. Press Deploy again. Do not escape the character by hand.

The Fix panel: repair a server from the deploy panel

This section explains the Fix panel of the deploy panel. A readiness check can stop the install on a server. For some causes, Deployment Manager knows the repair. Then the failure view shows the button Fix it. If the server has more than one such problem, the button names the problem: "Fix: <problem>". After one repair worked, it says "Next: <problem>".

Press the button. The Fix panel opens. It says what is wrong. It also says that the repair "runs on <server> over the SSH access stored for this installation, and touches nothing else there."

The repairs that the panel can offer:

  • "Stop it and free port <port>"

  • "Move Docker’s storage to <directory>"

  • "Make user <user> the owner of <directory>"

  • "Put the owner of <directory> back to <user>"

  • "Delete the images nothing uses"

Choose how far to go. Some repairs have more than one outcome. Then the panel asks "How far do you want to go?" and shows one choice for each outcome. Under each choice, one sentence says what it does. A warning sign marks a choice that stops something on the server. One choice can show the badge Recommended.

Nothing is chosen for you. This is on purpose. Until you choose, the main button says Choose how far to go. If you press it, the panel says "Choose how far to go first." After you choose, the button shows the name of your choice. A repair with only one outcome has no choice. Its button shows the name of that outcome, or Apply on the server.

Confirm what is stopped. The port repair stops a program that this tool did not start. The panel shows what the server reported about that program. Tick the box, for example "I have checked: <program> on <server> may be stopped". Without the tick, the panel says "Confirm you have checked what this is first."

See the commands. The fold Show the exact command (or Show the exact commands (<n>)) is closed at first. It holds the shell commands that the repair runs. Each command has a Copy button. The fold says: "If the account this tool connects with is not root and cannot use sudo without a password, nothing is changed - copy these and run them on <server> yourself."

Apply. Press the button with the name of your choice. The repair runs on the server. Press Cancel to close the panel without a change. When the repair worked, the panel says "Repaired." Repair the next problem if there is one. After the last repair, press Run it again. The install then checks the server again.

Retrying a failed server

This section explains the retry. After a failure, press Run it again. Then confirm with Run it again on (the server name), the "run it again on this server" action. It runs the installer again in the directory that already holds the install. It does not scp the bundle. It does not ask for secrets again. The .env is already on that server from the deploy that just ran.

A retry is refused while a deploy of that installation is running. Wait for the deploy to end. A validation shares the lock of each install directory with the deploys.

If deploy.sh is missing from the install directory, the retry stops with this sentence: "deploy.sh is missing from <dir>, so there is nothing to re-run there. The install itself is in place; press Deploy once and the retry works again after it."

The installer locks each run per install directory and per login. Two different logins are not locked against each other.

The retry is offered only when the run already copied something to the server. A failure before that point left nothing on the server to retry. In that case the panel offers a full Deploy.

The retry refuses to run on a half-copied install. That is a directory with a compose file but without its .env or deploy.sh. It means a copy stopped partway. A retry there would make the problem worse. The panel says so and tells you to run a fresh Deploy.

A retry runs the whole server again, every wave of it, in one go. It also runs all the readiness checks again.

What a retry cannot fix. It has no new bundle and no new secrets. It runs the script already on that server with the configuration already there. A wrong value or a bad bundle needs a fresh Deploy, not a retry.

The result of a retry is added to the roll-call. It does not replace it. For example, a three-server run failed on the second server. The second server is retried and succeeds. The third server still shows not attempted.

Rolling back the .env

This section explains the rollback. A server’s install directory may hold an earlier .env. A previous deploy or retry kept it. Then the panel offers Put the previous .env back.

  1. Press Put the previous .env back.

  2. Confirm. Then the panel does this:

    1. The current .env and the earlier one swap places.

    2. The installer runs again.

    3. Every container on that server starts again with the older configuration.

Nothing is deleted. The replaced file becomes the new .env.previous. Press the button again to restore the current one.

The panel shows two different results:

What the panel says What happened

There was no earlier .env on this server to go back to

A refusal. Nothing was changed, so there is nothing to undo. If the current .env is wrong, edit it directly on the server or deploy again.

The earlier .env could not be put back — check it on the server

The swap had already reached the server when something went wrong. Check .env and .env.previous in the install directory by hand before you deploy again.

A rollback does not find why an install is broken. The panel never says that it does. It is offered everywhere a retry is offered. The app cannot know if an earlier .env exists without opening SSH to check. It does not open SSH until you press the button.

Whose failure is it?

This section helps you see who must fix a failure. The panel’s messages are written around this question. Two of the most common are here:

  • The database refused the credentials. The database starts correctly and then refuses every service. This is the .env problem from Deploying over an existing install. A database creates accounts and schemas only on its first start with an empty data directory. So a new deploy over an existing data directory keeps the old credentials, whatever you just typed. Use the passwords that database already has.

  • A container did not come up — check its logs. First read the broken container’s own health probe. Then read its log on that server. Do not trust compose’s own dependency line (dependency failed to start: container X is unhealthy). That line always names the container that was waiting. It never names the one that actually broke.

Other failure codes of a deploy

This section lists failure codes of a deploy that no other section of this page explains. The panel shows a sentence under the code. Read that sentence first. It names the server and the file or step. For the codes of the readiness checks, see the readiness checks.

Codes where nothing on the server was changed

Code What it means What you do

foreign_install

The install directory already holds something this bundle did not put there. It is another installation, or another server of this one.

Install in another directory, or use the directory where this installation really lives. Do not delete what is there.

deploy_already_running

An earlier deploy.sh still runs in the same install directory on the server. This new deploy was not started.

Wait until the earlier run ends. Its output is in the .ft-run/ directory of the install directory. Then deploy again. Do not delete .ft-run/lock.

input_exhausted

The installer asked a question and nothing answered. This happens without a terminal, or after five unusable answers.

Run it again on a terminal and answer. Or give the answer as a flag, for example --install-dir, --ssh-user or --server-id.

bundle_incomplete

The bundle on the server lacks a piece of itself, for example the .env file, a server directory or a migration .sql file.

Create the bundle again. Download it fresh and run the install again. Do not add the missing file by hand.

ssh_host_key_changed

The server shows a different SSH host key than at the first connection.

If the server was rebuilt, save its SSH credential again to trust the new key. If it was not rebuilt, do not connect. Something else may answer at that address.

db_accounts_missing

The customer runs the database. The accounts that the services need are not on it, and the installer has no admin login to create them.

Run the install on a terminal on the first server and give the admin login of the database. Or run ./deploy.sh --db-accounts-sql and give the files it writes to the customer’s database administrator.

db_accounts_failed

The customer’s database refused to create or update an account. The admin login lacks the CREATE USER or GRANT right, its password is wrong, or the server is a read-only replica.

Read the line in the transcript. Fix the setting, or give an admin login that may create accounts on the primary database. Run the install again.

hand_fix_not_done

A finding that you promised to fix on the server is still there.

Clear it on the server as the upgrade review or HAND-FIXES.md describes. Or take back the promise on the upgrade review and make a new bundle.

wave_needed

The server takes part in several waves, and the run named none.

Run the command that the transcript names, with --wave and the next wave of this server. Add --all-waves only to start the whole server on purpose.

wave_not_in_plan

A wave was asked for that the bundle does not carry.

Run again without --wave, or with a wave that the transcript lists. If the wave should exist, make the bundle again.

wrong_host_for_wave

The wave belongs to a different server.

Run the wave on the server that the transcript names.

hz_reset_needed

A service that uses Hazelcast was about to change version while its old container still ran, and the Hazelcast cluster was not reset first.

Deploy from Deployment Manager. It does the reset. By hand, run deploy.sh --mode local --hz-stop clients on every server, then --hz-stop members, then --hz-start-members. Then run each server again with --from-wave 0.

hz_client_address

The hazelcast.xml kept on the server gives the Hazelcast member a public address but gives the connecting services none.

Add the line <public-address>HOST:PORT</public-address> to the client endpoint of that file. Use the same host and port as the member. Run the same bundle again.

upgrade_manual_pending

The upgrade has steps that only a person with the customer’s own database can apply. The run stopped for them.

Take your own dump first. Apply the SQL that the transcript prints. Run the upgrade again with --upgrade-manual-done.

upgrade_backup_space

The server has too little free space for the database dump that comes before the first migration step.

Free space on the file system of the install directory. Deploy again.

upgrade_backup_failed

The database dump did not complete. The upgrade stopped and the schema is unchanged.

Read the detail line. It names the database and the failed check. Run the dump command by hand in the container and read its message.

upgrade_backup_undeclared

A service has migration steps and no backup rule in its contract. Nothing was generated.

Read the contracts of this installation again. If it does not help, the contract in the service repository must declare the backup.

bundle_plan_mismatch

The bundle has migration steps for a service and no way to take a dump of its database. The upgrade stopped before any migration step.

Read the contracts again, make the bundle again, and copy the new one to the server. Do not run the same bundle again.

Codes where the install may have started

Code What it means What you do

lost_contact

The connection to the server dropped and did not come back in 15 minutes. deploy.sh runs detached, so it may have finished, failed or still run.

Check that the server answers again. Read the run log .ft-run/<id>.log in the install directory, or press Check what is running. Deploy again only after that run ended. Do not read this as a failed install.

hz_reset_failed

The Hazelcast reset did not finish on one server. A container did not stop, or Hazelcast did not start again in time. No service was upgraded.

Read the sentence under the code. Fix what it names on that server. Run the same bundle again.

upgrade_step_failed

A migration step did not apply after all retries. The dump was already taken.

Read the database error in the transcript. Fix it and run the upgrade again. Applied steps are not repeated.

host_out_of_memory

The machine ran out of memory and the kernel stopped a process in a container. The container only restarts, so it looks like a service that keeps failing.

Give the machine more memory, or stop other work on it. Do not raise the heap setting of a service.

heap_out_of_memory

A Java service used all the memory that it is allowed.

Raise the memory setting of that service on the Variables step, for example its *_JAVA_RAM value. Deploy again.

installer_bug

The installer script broke its own rule. The server is fine.

Send the transcript to the Deployment Manager team.

Options and exit codes of deploy.sh

This section explains deploy.sh when you run it yourself, not from the deploy panel. Run ./deploy.sh with no arguments on a terminal. It asks where you are, whether the servers can reach the registry, and where to install. Then it prints the equivalent command line for next time. ./deploy.sh -h lists every option.

Exit codes of deploy.sh

This section lists the exit codes of deploy.sh. A script, a CI job or the Windows launcher reads the exit code. The Windows launcher names it in its messages, for example "exit 3".

Exit code What it means What you do

0

The run finished without a problem.

Check that it works. See Step 7. Check that it works.

1

The run stopped with a line FAIL <code>. The code and the sentence after it name the reason.

Find the code in Other failure codes of a deploy or in When something goes wrong.

2

An option is wrong, has no value, or does not go with another option. Nothing was changed.

Read the line that starts with deploy.sh:. Correct the command. Run it again.

3

A check refused the run before it changed the install. Examples: the adopt-check did not pass, a server in several waves was started without --wave, or a database dump would not fit.

Read the lines above the exit. Fix what they name. Run it again.

4

The run stopped at a safe point after a Stop. Nothing was undone.

Run the same bundle again. It continues from there. See Stopping a deploy.

5

A force stop ended the run.

Check the database first. Then run the same bundle again. See Stopping a deploy.

6

A question needs an answer, and nobody can answer it here. Nothing was changed. The ft-need lines name each question.

Run it again on a terminal and answer. Or answer in advance with the flag that the script names. See Questions the upgrade asks.

7

The run used --pause-before-start. You did not type Start, or a signal arrived while it waited. Nothing was started. The copied files were removed.

Run it again when the window opens. See Copy first, start later.

The environment check before an install by hand

This section explains the first check of an install that you start by hand. deploy.sh logs in to every server. Then it checks all servers at the same time. It checks before it asks any install question and before it copies anything.

The environment check looks at these things on each server:

  • Docker is installed and its daemon answers.

  • The login may run docker.

  • docker compose v2 is installed.

  • There is room for this server’s part of the bundle.

  • There is room for the images, or the server can reach the registry.

  • The host checks of preflight.sh: ports, limits (ulimits), DNS and others.

Problems that stop the install. These rows stop the run at once. The script prints "── stopped: the environment check did not pass ──". Under it, it lists each server and the problem. Nothing was changed on any server.

  • "docker is not installed. Install Docker Engine 20.10 or newer and the compose plugin, then run this again."

  • "docker does not answer". Start Docker on the server.

  • "this login may not run docker". Add the login to the group docker, or give it sudo for docker.

  • "docker compose v2 is missing. Install the docker-compose-plugin package, then run this again."

  • The bundle part does not fit, and the install directory does not exist yet.

  • The images do not fit in an empty Docker storage, for an offline install.

  • The server cannot fetch its images from the registry.

  • The preflight.sh checks compose_version, port_published_twice, build_bases and image_store.

Problems that only warn. Other rows do not stop the install. Examples: a port in use, limits, DNS, or an estimate of the disk space. The script shows them in one table. It starts with "The environment check found <n> things to fix (none of them stops the install):". Each server checks them again before it is changed. It stops there if the problem is still there.

What happens next depends on the terminal:

  • On a terminal, the script asks "Continue anyway and fix it after?". The default is no. Answer no and the run stops. It prints "── stopped: you chose to fix the environment first ──".

  • Without a terminal, the run goes on. The script prints the warnings and "going on with these warnings (no terminal to ask; --stop-on-warnings stops here instead)".

  • Add --stop-on-warnings to stop on a warning when there is no terminal. The script then prints "── stopped: --stop-on-warnings, and the environment check warned ──".

Install offline with deploy.sh --offline

This section explains the option --offline. Use it when the servers have no route to a registry. With --offline, deploy.sh loads every image from the archives in the bundle. It never pulls an image.

  • --offline refuses to start if the archives are not in the bundle. It does not fall back to a pull that cannot work. Nothing on the server is changed.

  • Make the archives where the registry can be reached. Use ./pull-images.sh or pull-images.ps1.

  • Without arguments on a terminal, deploy.sh asks whether the servers can reach the registry.

The message of the refusal and the steps are in the option --offline of deploy.sh.

Options of deploy.sh that change waits, retries and backups

This section lists the options that change how long deploy.sh waits, how often it tries again, and where it keeps database dumps. Each option has a default. Change it only when you need to, for example on a slow machine, with a big database or on a small disk.

Option Default What it changes

--healthcheck-timeout <seconds>

600 seconds (10 minutes)

How long the installer waits for the services to report healthy. The limit applies to every server.

--healthcheck-poll <seconds>

10 seconds

How often the installer asks the services during that wait.

--skip-healthcheck

Off

The installer does not wait for the services to report healthy after the start.

--upgrade-retries <n>

12

How many times the installer tries a migration step again while the database is still starting.

--upgrade-retry-delay <seconds>

10 seconds

The wait between two tries of a migration step.

--backup-keep <n>

2

How many database dumps to keep for each service in <install-dir>/db-backups. Older dumps are deleted after each successful dump.

--backup-min-free-mb <n>

1024 MB

The free space that an upgrade needs before it dumps a database. It is also the minimum when the size estimate of the contract cannot be read.

--backup-dir <abs-path>

<install-dir>/db-backups

Where the dumps go for a step that cannot be undone, and for a "make one now" dump. Give an absolute path. Each run writes into its own private folder ft-<gen8>/ there.

--live-progress

On at a terminal

The image download percentages are drawn again in place.

--color

On at a terminal

The words INFO, STAGE, WARN and ERROR are shown in colour, also without a terminal.

Options of deploy.sh that answer a question in advance

This section lists options that give an answer before deploy.sh asks. Use them in a script, in CI, or with -DeployArgs of the Windows launcher.

Option The question it answers

--backup-made

"Has a backup of this installation been made?" Answer: yes.

--make-backup

The same question. Answer: no, make one now.

--no-backup

The same question. Answer: continue without a backup. This is recorded.

--no-password-login

A server refuses the SSH key. On a terminal, deploy.sh then offers "Log in with a password?". With this option it never offers it, and the install stops.

--consent <q8,…​> and --consent-for <server>=<q8,…​>

The questions that an ft-need line names. They never grant a step that cannot be undone. See Questions the upgrade asks.

--all-waves and --from-wave <n>

"Start the whole host anyway?" See Deploy waves when you run deploy.sh on a server by hand.

--upgrade-manual-done

The migration steps on a database you run yourself are already applied. Do not stop to ask.

--db-accounts-done

The customer’s DBA has created the service accounts. Go on even if one does not sign in yet. See The customer’s database: give the admin login without a terminal.

The customer’s database: give the admin login without a terminal

This section explains how deploy.sh gets the admin login of a database that the customer runs. This is a MySQL or ClickHouse database. The services need their own accounts on it. deploy.sh creates them with an admin login of that database. It takes the login from the first of these that you give:

  1. The option --db-admin-file <path>. The file holds these lines: FT_DB_ADMIN_USER=, FT_DB_ADMIN_PASSWORD=, FT_CH_ADMIN_USER= and FT_CH_ADMIN_PASSWORD=. The FT_DB_ lines are for MySQL. The FT_CH_ lines are for ClickHouse.

  2. The option --secrets-from-env. Then deploy.sh reads the same four names from the environment.

  3. On a terminal, it asks "Admin login for the customer’s MySQL at <address> (leave empty if you have none: the SQL is then written for the DBA):". For ClickHouse, the question names ClickHouse. Then it asks "Password for that login:".

The file of --db-admin-file must be a regular file that you own and that only you can read (chmod 600). It must not be a link. Otherwise the run stops with db_accounts_failed. Nothing is started. A login name may use letters, digits and _ . @ - only.

With no admin login. deploy.sh checks if the service accounts already sign in. If they do not, it writes the SQL that creates them. The file is db-accounts-for-dba.sql for MySQL and db-accounts-for-dba-clickhouse.sql for ClickHouse. It is next to deploy.sh.

  • On a terminal, deploy.sh asks "Type 'done' once the customer’s DBA has run it, or anything else to stop:". Give the file to the customer’s DBA. Type done after the DBA ran it.

  • Without a terminal, the run stops with db_accounts_missing. Nothing is started. Give the file to the DBA. Then run ./deploy.sh --db-accounts-done.

Write the SQL first. Run ./deploy.sh --mode bootstrap --db-accounts-sql on the computer you install from. It writes the SQL file and stops. It does not contact any server. The file holds placeholders, not passwords. Add --with-passwords to put the passwords in the file. The file is then chmod 600. --with-passwords needs --secrets-from-env, because it reads the passwords from the environment.

Import the old NBI settings into ft-configs

This section explains how an upgrade moves the old NBI settings into ft-configs. Before the new containers start, deploy.sh saves the old settings files of northbound-api and service-api. It keeps them in .ft-adopt/configs-import/ in the install directory. After the start, it does this:

  • The old NBI settings are imported into ft-configs. They are merged. Keys that ft-configs does not know are not sent.

  • This happens only when ft-configs did not run on that server before. Otherwise ft-configs keeps its own settings. The script only shows what an import would change.

  • The old Service API settings are only compared with ft-configs. They are never imported.

The import needs the admin login of ft-configs. deploy.sh takes it from the first of these that you give:

  1. The option --configs-admin-file <path>, with the lines FT_CONFIGS_ADMIN_USER= and FT_CONFIGS_ADMIN_PASSWORD=. The file must be chmod 600, owned by you, and not a link.

  2. The option --secrets-from-env. Then it reads the same two names from the environment.

  3. On a terminal, it asks "ft-configs admin login, to import the old NBI settings (leave empty to skip):". Then it asks "Password for that login:".

The login has 3 to 50 characters: letters, digits and _ . @ -. The password has 8 to 64 characters.

The import never stops the install. An empty answer skips it. Without a terminal and without a login, it is skipped too. The script then says "No ft-configs admin login: the import of the old NBI settings is skipped on <servers>; each prints the command to run it later."

Import later. Run this on the server:

./deploy.sh --configs-import --install-dir <install dir>

This command does only the import on this server. It starts nothing. You can run it again safely. It does not run together with --adopt-check, --wave, --rollback, --force-stop, --tabs, --kc-move, --hz-stop or --hz-start-members.

ft-configs may want its admin password changed first. Then the script says so. Sign in to ft-configs once and set a new password. Then run the command above.

Good to know about running the installer by hand and about restarts

This section lists facts for special cases.

Running the installer by hand

This section lists two facts for when you run deploy.sh yourself, not from the panel.

  • It needs bash 4 or newer. An older one, such as the version macOS ships, stops at once with the message bash >= 4 required. Install a newer bash and run it again.

  • It marks a refusal and a crash with different FAIL lines. A refusal names its reason. A crash names the step it stopped in (in_stage).

What a restart of Deployment Manager does to a running install

This section explains what happens to running deploys when the tool restarts. Examples of a restart: a release, a moved pod, an evicted node. Without protection, a restart would stop an install in the middle of a copy or of up -d. It would stop on a customer’s production machine, and nothing would be recorded. The tool protects running deploys. When it gets a normal shutdown signal:

  1. It refuses to start any new deploy. If you press Deploy, a message asks you to try again in a few minutes.

  2. Every deploy already running continues until it finishes, up to a maximum wait.

  3. The tool stops only when every running deploy has ended, or when that wait runs out.

This does not affect the customer’s server. On the server, the SSH session that copies files or runs deploy.sh continues.

For administrators: the shortest timeout decides. Several deadlines apply, and each one ends with a forced kill. So the smallest one decides. If you raise only the tool’s own wait, nothing changes. With platform defaults, the wait is well under a minute. Then the protection does nothing, and nothing tells you. See the environment variables for the values to raise together.

A forced kill gives the tool no time to wait. Examples: out of memory, or a pod deleted with no grace period. A deploy killed this way is recorded as interrupted, not finished. The same three results from Retrying a failed server apply. Check what actually reached the server before you assume a clean failure.

The browser loses its connection

This section explains a more common case. The browser can lose its connection to the panel during a deploy. Examples: a network problem, or a closed laptop. The panel tries to reconnect by itself. It says Connection lost — reconnecting. The deploy keeps running. The text under the step list says: "Connection lost - reconnecting; the deploy keeps running on Deployment Manager." When the connection returns, the panel says: "Reconnected - below is what the deploy printed meanwhile." You can also open the installation again: the panel goes back to the running deploy. You cannot start a second deploy of the same installation while one is running.