Install the system at a customer site
This page shows the whole job of installing our platform at a customer site. It has seven steps. Each step has its own page with the details. For the words used here, see Words you need to know.
Before you start
This section lists what you need before step 1.
-
An account with the role user or higher. See People and roles.
-
Access to the installation you will work on, if you did not create it. See roles and installation access.
-
The training modules for the actions you will use. See Training.
-
The addresses of the customer’s servers, and a way to reach them over SSH. If the tool cannot reach the site, you can still create the bundle and carry it there.
The seven steps
Do these steps in this order. Each step gives you what you need for the next step.
-
Choose a topology. A topology says which services to install, and which server each service runs on. Pick an existing topology on the Topologies tab, or create a new one. Several installations can use the same topology.
Details: Step 1. Choose a topology
-
Create an installation. An installation connects the topology to the customer’s real servers. You give it the customer, and an address for each server. It appears as one card on the Installations tab.
Details: Step 2. Create an installation
-
Fill in the variables. Variables are the settings that the services need. Most variables already have a default value. The tool asks for each secret once per name. For some values the tool does not make up a value. It asks you instead.
Details: Step 3. Fill in the variables
-
Create the bundle. The bundle is the package that goes to the site. It holds a compose file for each server, the configuration files, an environment file for each server, and the installer. It can also hold the container images.
Details: Step 4. Create the bundle
-
Test the bundle. Test install runs the bundle on temporary servers. The tool creates these servers and then deletes them. Nothing reaches a customer. This step is optional.
Details: Step 5. Test the bundle
-
Deploy. Click Deploy. The tool sends the bundle to the servers over SSH and installs it. You see a live log.
Details: Step 6. Deploy
-
Check that it works. Use Health to see what every service is doing now. Use Diagnostics to collect one file that you can read later.
Details: Step 7. Check that it works
Check the servers before you install
This section explains the Server check screen of an installation. The check runs the checks of the real install on each server. It installs nothing and changes nothing. It shows what would stop the install.
You can check the servers in two ways:
-
Over SSH. DM reaches the servers and checks them itself. See Check the servers over SSH.
-
At the site. You download the check, run it on the servers and upload the result files. See Check the servers at the site.
Check the servers over SSH
Use this way when DM reaches the servers over SSH.
-
Open the installation. Go to Server check.
-
Press Check servers now.
-
Wait. Each server shows Checking, and then its result.
-
Read the result of each server. See Results of the server check for each server.
-
Fix what a server needs. Then press Check <server> again, or Check all again.
DM needs a stored SSH login for every server before it starts. If one login is missing, nothing is checked. Store the logins first. See SSH access.
The check is refused in these cases:
-
The installation goes to the site as a bundle, not over SSH. The screen says: "DM checks servers itself only when it reaches them over SSH. Download the server check and run it at the site."
-
A deploy or another action runs on the servers of this installation. Wait until it ends.
-
The bundle cannot be built from the current plan and settings. The screen sends you to Plan or Settings to fix it.
Check the servers at the site
Use this way when DM cannot reach the servers.
-
Open the installation. Go to Server check.
-
Press Download the server check. You get the file
<installation>-check.zip. -
Under Run it from, choose On each server, From one Linux machine or From a Windows computer.
-
Copy the check to the servers. Run the command that the screen shows.
-
Press Choose files. Choose the result files. You can choose all of them at once.
-
Read the result of each server. See Results of the server check for each server.
The commands are:
| Run it from | Command | The file to upload |
|---|---|---|
On each server |
|
One file on each server: |
From one Linux machine |
|
One file for each server. The command collects them in the folder |
From a Windows computer |
|
One file for each server, in the folder |
On Windows, the Install step shows short answers to common problems: scripts blocked, why not to unpack the zip, a closed terminal window, and the questions you may get. See Windows questions on the Install step.
<id> is a short code of letters and digits. It belongs to the check that you downloaded. It is
the same on every server, and it is not the server name. The screen shows it in the returns
folder path.
The screen also lists one command line for each server, in the column Or from one computer. Copy all, from one computer copies them all. Use the filter Show (All, Still to run, Ready, Need a fix) and Sort (Status, problems first or Server name) to find a server.
DM accepts only these two file names: adopt-check-<id>.tsv and <server>-adopt-check.tsv.
Upload the files of the check that you downloaded last. If you changed the plan or the settings
after a download, the files of that download no longer count. Download the check again.
On each server the file has the same name. When you copy the files off the servers, keep each one in its own folder. Do not rename it. DM reads the server name inside each file and matches the file to its server. The screen counts how many files are uploaded.
The zip holds the same settings files as the bundle download. Keep it as safe as a bundle. The secrets that you type yourself are never in it. The download needs the same training module as the bundle download.
Results of the server check for each server
| Result | What it means and what to do |
|---|---|
Ready |
Nothing would stop the install. On a new server the line can be "Ready: nothing is installed in <install dir> yet." |
Problems |
Something would stop the install. The screen sorts these servers in two groups. In DM can fix, the line says "<server> is not ready. DM can repair it." Press Fix it. In Do on the server, the line names the first problem. For example: "A port the install needs is already in use." Under it, the screen says what to do on the server. Do it, then press Check <server> again. |
Choose a way |
The line says: "<server>: DM cannot take over the installation here as it is." Press How to rearrange it. Move the installation into the documented layout by hand. Then check this server again. The button Install a new <service> on <server> asks you to confirm. Then this DM answers that installing fresh from here "is not available on this DM yet". Do not use it. |
Not reached |
The check did not run on this server. The table below gives the reason. |
Still to run |
This server is not checked yet. A server shows Out of date when the result no longer counts, and Waiting while it waits for its turn. |
A server is Not reached for one of these reasons:
| The screen says | What to do |
|---|---|
DM could not sign in to this server over SSH. |
Check the SSH login in Install → Access, then check again. |
The server’s identity changed since DM first signed in to it. |
If the server was rebuilt, save its SSH login again in Install → Access, then check again. |
The SSH login on this server is not root and cannot use sudo without a password. |
Change the SSH login of this server in Install → Access. Use a login that is root or may use sudo without a password. Then check again. |
The check on this server did not finish in time. |
Check that the server is not overloaded, then check it again. |
Next: Questions opens when every server is Ready. A server with another result keeps it closed. The line beside it says how many servers need a fix first.
When the result goes out of date. If you change the plan, the settings, the topology or the server reports, the old result no longer counts. Each server then says: "Settings changed after this check. Check again." Your answers in Questions never do this. You can answer questions without checking the servers again.
When the check is not needed. The screen then shows Skipped or Not needed, with one of these reasons. Next stays open.
| Reason | When you see it |
|---|---|
Not chosen for new, empty servers |
A new install where the server check was not chosen. |
DM checks the servers itself before Install |
An upgrade that DM installs over SSH. DM runs the same checks when the install starts. |
Not needed for this change |
A change of settings only. |
The install always checks the servers again when it starts. See Before anything is copied.
A warning about the customer’s other database servers
This section explains one warning in the readiness checks. It appears only when the customer runs the database on several servers, and you typed an address for a server other than DB_HOST. See the customer’s database on several servers.
Before the install, the readiness check tries to reach each of these servers. If a server does not answer, the check prints this warning:
<service> <id> (<role>, external): <address> not reached (does not resolve or does not answer) - our services do not connect to it, so the install continues
The warning never stops the install. It does not change the result of the check. Your services do not connect to these servers. Only the DB_HOST server is a hard check.
If the address of a server is the same as DB_HOST, the tool checks it once, as the DB_HOST server. Then an unreachable address stops the install, as it did before.
A server without an address is not checked. The check also skips a server that the topology no longer lists.
The Test install shows the same warning. See the warning in a Test install.
The tool does not install or change anything on the customer’s database servers. For the four readiness checks, see the readiness checks.
The readiness check on the customer’s database server
This section explains what changes in the readiness checks on a server that the topology marks as the customer’s database server. See Monitor this server. The same rules apply to a server that holds only exporters.
The tool is a guest on this server. Its administrator makes every change. So the checks differ in three ways:
-
The check does not test the file limits. The report says: "[1/6] ulimits - not checked: this is the customer’s database server, and the exporters on it do not need the floors".
-
The report offers no repair. It has no repair command and no line for the Fix button.
-
A refusal tells you who acts. For example, if a port is held by another program, the report says: "This is the customer’s database server - ask its administrator to free those ports, or give the exporters different ports and generate the bundle again."
The report starts with this line: "this is the customer’s database server: its limits are not checked, and no repair is offered - its administrator makes every change".
The checks for ports and disk space still run. They still stop the install when they fail.
Other servers of the same installation keep all checks and their repairs.
If you ask for a repair anyway
If you start a repair for the customer’s database server, the tool refuses and changes nothing. The text names the repair. For example:
"DM_DB_Master is the customer’s database server, so the tool does not raise its file limits and restart its Docker - ask the customer’s administrator."
The tool also refuses in two more cases:
-
The server is no longer in the topology: "This server is not in the installation’s topology any more - check the Servers step."
-
The tool cannot read the topology: "This installation’s topology could not be read, so the tool cannot tell whether this is the customer’s database server - nothing was changed."
If another server of the installation uses the same address as the customer’s database server, the tool refuses it too. The text starts with "<id> is at the address of <server>, the customer’s database server, so the tool does not …". The tool does not detect a different name for the same IP address.
The failure guidance in the deploy panel ends with one more sentence for every problem that promises a Fix: "On the customer’s database server the tool offers no Fix - ask the customer’s administrator to do this." Read it only if the failing server is the customer’s database server.
Directory and project name for each server in bootstrap
This section explains the install directory and the compose project name when you run
deploy.sh --mode bootstrap. See carry the bundle by hand and
the Windows jump host. Each server can have its own
directory and its own project name.
If the installation has one server, bootstrap asks the same questions as before. If it has more
than one server, bootstrap asks for one directory. Then it asks "Same directory (<dir>) and project (<name>) on
every server?". The default answer is yes. Answer n to get one question for each server. Bootstrap also asks for
each server when the bundle already holds different values for the servers. The bundle holds the
values that you chose in the panel.
Bootstrap checks the containers on every server before it copies anything. The checks are the
same as in the panel. See containers that are not
part of this installation. If a server has a conflict, bootstrap names it and asks again for
that server. For a rename it asks "Rename the project on <sid> from X to Y? [y/N]". For
containers to remove it asks "Remove these containers on <sid>: a, b (their data stays on
disk)? [y/N]". If you answer N, bootstrap stops before it copies anything.
A server that you set with a flag is not asked.
| Flag | What it does |
|---|---|
|
Sets the install directory of one server. Repeat the flag for more servers. |
|
Sets the compose project name of one server. |
|
Agrees to rename the running project |
|
Agrees to remove containers of the listed services on that server. Use |
|
Set the same value on every server. |
The <sid> is the server id from the installation. An unknown id is a usage error. A per-server
flag beats the global flag. A global flag beats the value in the bundle. The -for flags work
only in bootstrap.
A run without a terminal, or with --plain, cannot ask. It uses the flags and the values in the
bundle only. If a conflict needs an answer, the run fails before it copies anything. The codes
are foreign_containers, project_name_changed and retire_not_accepted. Give the flags for
every server that needs one.
With --mode local you work on one server. Use --install-dir, --project-name,
--rename-project <old> and --retire <services>. --retire all accepts every removal. If the
directory name gives no usable project name, --mode local stops and asks for --project-name.
A directory allows only these characters: ^/[A-Za-z0-9._/-]+$. It starts with /. A space or a
non-ASCII character is refused. An existing install in a directory with a space cannot be
retried or checked from the panel. Deploy it again from the panel into a valid directory.
Flags from a Windows jump host
On a Windows jump host you start the install with deploy-windows.ps1. To give the install run
extra flags, use the -DeployArgs parameter. Write each flag and its value as separate items,
with commas between them.
.\deploy-windows.ps1 -DeployArgs '--install-dir-for','acs-1=/opt/ft-system','--validate'
These flags are allowed:
-
--install-dir-for,--project-name-for,--rename-project-forand--retire-for. Each one needs a value like<sid>=<value>. -
--validateand--no-validate. They take no value. They switch the check after the install on or off.--validateruns it.--no-validateskips it.
A value for the four -for flags must match ^=[A-Za-z0-9._/,-]$. Any other
flag, or a value that does not match, stops the script before it connects.
Copy first, start when the window opens
Use --pause-before-start when you must copy the files now and start the system later, for
example when the customer gives you a maintenance window. Add it to the usual bootstrap command.
./deploy.sh --mode bootstrap --pause-before-start
The run does this:
-
It checks every server, as it always does.
-
It copies the files to every server.
-
It waits. Nothing is started or stopped on any server while it waits.
To start, type Start with a capital S and press Enter. The run then continues as a normal
bootstrap.
Anything else stops the run with exit code 7. This includes start in lowercase, closing the
terminal and Ctrl-C. Then nothing starts, and the run removes the copied files from the servers.
If it cannot remove the files from one server, it prints the exact line that removes them, for
example ssh admin@db1.example rm\ -rf\ --\ /var/tmp/ft-stage.AbC123. Run that line by hand, as
it is printed. The run also writes the same lines to ft-pause-leftovers-<time>.txt beside
deploy.sh. If it cannot write that file, it says so; then keep the lines from the screen.
What can stay after a run that stops:
-
the copies that those lines name, until you remove them by hand;
-
on a server you take over from an earlier installation, the result of its check in
.ft-adopt/in the install directory. The next run with the same bundle uses it again.
On this machine, the secrets you typed stay in the bundle and in the credentials file, as after any bootstrap. To install, run the same command again.
Things to know:
-
Run it inside
tmuxorscreen. The wait can be long. A dropped terminal counts as stop. -
It needs a terminal. Without one it refuses and exits with code 2. With
--dry-runit does not need a terminal. -
Run it from a Linux or macOS machine with
./deploy.sh. The Windows launcher (deploy-windows.ps1) does not offer it. -
On a server where the login writes the install directory itself (with or without
sudofor docker), the files wait in/var/tmp. So/var/tmpthere must be owned by root or by the login. If other accounts can write to it, it must have the sticky bit. The same holds for each directory above it. If/var/tmpis a link, it may point to a directory that follows the same rules, but not to another link. If not, the run stops before it copies anything to any server, withinsufficient_privilege. It tells you to fix/var/tmpor to run without the flag. -
/var/tmpon each server also needs room for the files of that server. This is checked while the files are copied. If one server has too little room, the run stops withstage_disk_fulland exit code 7, and removes what it copied. Free space in/var/tmpon that server and run again. -
A server you take over from an earlier installation gets its files through a private directory in
/var/tmptoo, with or without this flag. Its install step first keeps a safety copy of the site’s own files, so that a rollback can put them back. There,/var/tmpmust follow the same rules, and it needs room for that server’s files, image archives included. Both are checked in the first phase, before anything is installed on any server. If one is not met, the run stops withinsufficient_privilegeorstage_disk_full, and the sentence says what to fix. -
After
Start, the run may ask for a password again. It asks only for a server whose connection dropped during the wait. -
Exit code 7 means: the run stopped after the copy began and before
Start. Nothing was started.
From a release to software running at a customer
This section shows the whole job, from the new version to a running system. It includes the steps that a person does by hand.
-
A release is created and published in CI/CD Manager. A release is a set of service versions that belong together. It is sent to this tool automatically when it is published. Nobody needs to press anything here. If the release does not arrive, nothing here reports it. See how a release arrives.
-
An operator creates or opens an installation. The operator connects its servers and answers its variables. At the version step, you can pick the published release. This fills in, in one action, the version of every service that the release names. The tool lists the services that the release does not name. Fill those in yourself. It only fills in the versions. It does not decide them for you.
-
The tool generates a bundle. The tool refuses if the installation no longer matches its topology. It also refuses if a value is missing. The refusal names what is missing.
-
Optionally, you run a practice install of the bundle on temporary servers. See Test install. This proves that the bundle installs. It proves nothing about the customer’s network, storage, firewall or hardware.
-
The bundle goes to the servers. This tool can send it over SSH. Or someone carries it to the site and installs it by hand. About half of customer sites use the second way. This tool can never reach those sites. So for them, the last step below is a statement by a person. The tool does not see it.
-
The install runs in steps, in the order that the topology requires. The servers in one step install at the same time. If a server fails, the other servers in its step still finish, and no later step starts. See Deploy.
-
Someone confirms that the installation is live. This happens automatically when the deploy ran from here and finished without errors. Otherwise, someone marks it as installed. See install stages.
-
The installation is verified, and later upgraded. An upgrade is the same sequence with one extra answer: the version that is already on those servers. It also has one extra protection. The tool takes a database dump before the first migration, because there is no schema rollback. See Update an existing installation.
For how a new operator goes through this the first time, see a new operator’s first day.
If something goes wrong
See When something goes wrong. It lists failures by what you see. It helps you find out if the failure is in Deployment Manager, in the software you install, or on the customer’s server.