Step 4. Create the bundle
This page shows you how to create the bundle. The bundle is the package with everything
needed to install on the customer’s servers. It is one .zip archive.
Before you start
This section lists what must be ready before you create a bundle.
-
You created an installation. See Step 2. Create an installation. An installation is one customer site in the tool.
-
Every server of the installation is bound. A bound server is a real machine with an address, chosen for a place in the topology.
-
Every variable has an answer. See Step 3. Fill in the variables.
-
You know if the customer’s servers can reach the image registry (FT HUB). If they cannot, you need an offline bundle. See Offline installs (no route to the registry).
For the product words on this page, see the glossary.
Steps to create and download the bundle
This section shows how to create the bundle and download it.
-
Open the Installations tab.
-
Find the card of your installation.
-
Press ↓ Download. A dialog opens. Its title is Download and the installation name.
-
If the installation has more than one server, the dialog asks Zip layout above the two cards. Choose one answer:
-
Each server on its own: this is the default. You get one
.zipfile for each server. You copy each server its own file. Use it when you install by hand, or from a Windows jump host that sends each server its own file. -
From one machine, over SSH: you get all servers in one archive. You run
deploy.shon one machine. This machine reaches the other servers over SSH and installs them all, in order. Use it for an SSH hub and for the Windows hub in From a Windows jump host.
-
-
Choose one of the two cards:
-
Configuration: press ↓ Download. If the installation has third-party images, this button reads ↓ Download (includes the 3 third-party images). The file is ready now, or it is built when you press the button. See Third-party images in the configuration download.
-
Configuration + images: press Build with images. Use this when the customer’s server cannot reach FT HUB. The archive is several GB. It takes minutes to hours.
-
-
Wait for the archive. The configuration archive downloads at once. The archive with images is built in the background. See How it is built.
-
When the archive with images is ready, the buttons are Download per server and Download for one machine. They have the same meaning as the two Zip layout answers in step 4.
-
Save the
.zipfile. Now you can test it (see Step 5. Test the bundle) or carry it to the site.
At the top, the dialog can show a line like Last download started 2 hours ago: Configuration + images, each server on its own. It tells you which file went out last. It does not choose anything for you. The install steps on the card follow the file that went out last. Press Install steps on the card to see them.
The dialog has a Cancel button. After an archive with images exists, it also has Build a new archive. See How it is built.
With one server, the dialog does not ask How will you install?. There is nothing to split.
You do not always need to download. Deploy on the card creates the same bundle and sends it over SSH. See Download versus Deploy.
| Right after you create an installation, the dialog Installation created asks What would you like to do with it? It offers ↓ Download .zip, Deploy over SSH and Run a test install. You can close it. All three stay on the installation card. |
Third-party images in the configuration download
This section explains the Configuration card. Some images do not come from FT HUB. They are third-party images. A customer who allows only FT HUB through the firewall cannot pull them.
If the installation has such images, the Configuration card says how many are inside. The download packs them into the zip. This is built when you press ↓ Download. You can wait or close the window. The customer then opens the firewall to FT HUB only.
The card also has a small button, Download without them. This button gives you the plain zip. At install, the servers pull these images from their own registries, not only from FT HUB. Use it when the servers can reach those registries.
If the tool cannot work out which images are third-party, the card shows Cannot be built. It says what is missing. The plain zip is still there. If a build of the third-party images fails, the card shows Last build failed and the button Build again. Press Build again, or press Download without them. While the build runs, the card shows Building and the button Show progress. When it is ready, the card shows Ready, the size and the date until which the archive is kept.
If no image is third-party, the Configuration card has only ↓ Download. The file is a few MB.
What you see: the files in the bundle
This section lists the files in a bundle. The tool builds the bundle from the installation’s
topology, contracts and variable answers. The archive
for one machine has deploy.sh, README.md, pull-images.sh and pull-images.ps1 at its root.
Next to them is one directory for each server bound to the installation.
With Each server on its own, you get one outer .zip. It holds one .zip for each server, named
after the installation and the server. Each server’s zip holds only that server’s directory and its
images. On the server, ./deploy.sh with no options installs that server here. It does not ask
which server it is. A server’s directory holds:
| File / directory | What it is |
|---|---|
|
The Docker Compose file for that server. There is one per server, not one for the whole installation. Two servers rarely run the same set of containers. |
The configuration trees |
Configuration files for each service. The containers use them directly. Examples: application settings, certificates, database init scripts. They are plain files in each service’s own directory. They already contain this installation’s values. |
|
The environment file(s) for that server. There is a root file. There is also one file for each service that needs its own (see dm-variables.adoc#per-service-vs-root). Every value that is not a secret is already filled in. The installer asks for secrets when it runs. |
|
The installer. It runs on the server. It asks a short set of questions. Then it installs everything in the archive. See What the installer asks. |
|
A checklist for the whole install. You can follow it with nothing else open. It says what to copy where and what to run. It explains each question |
The archive is the delivery, not the install. Copy it, or the server’s own zip, to the server and run deploy.sh there.
deploy.sh copies only that server’s files into the install directory and works there. See
Carry the bundle to a server by hand and From a Windows jump host.
Other files in the bundle and who reads them
This section lists the other files that you can see when you open a bundle zip. The installer and the check scripts read these files. You do not edit any of them. You only look at a file when support asks you to, or to see what a bundle holds. A file marked "only when" is not always in the bundle.
| File | Where it is | What it is for | Do you change it |
|---|---|---|---|
|
Root of the archive |
The order in which the servers are installed: the layers and the waves. |
No |
|
Root of the archive, only when the installation has an installed version |
The plan of an upgrade. A bundle for a fresh install has no |
No |
|
Root of the archive, only when DM resolved the service contracts |
Names the commit that each service’s contract came from. Support uses it to find which contract made the bundle. |
No |
|
Root of the archive and in every server directory |
The list of images. The file at the root lists the whole installation. The file in a server directory lists what that server needs. |
No |
|
Every server directory |
The name of this server in the topology. |
No |
|
Every server directory |
The names of the secrets that this server asks for when you install, one name on each line. The file is empty when the server needs none. It holds no password. |
No |
|
Server directory, only when a secret is written into a file |
Each line holds a secret name and the files where |
No |
|
Server directory, only when a service contract declares it |
One line for each configuration file: |
No |
|
Every server directory |
The folders that the installer fills from the bundle and that can be written. The installer does not change the owner of these folders. |
No |
|
Server directory, only for a server that serves the customer’s certificate |
The names that the certificate must cover, the services that use it, and the script that checks the certificate. See the certificate page. |
No. Run |
|
Server directory, only when you answered the certificate question in advance |
One word: |
No |
|
Only the server that hosts the portals |
The script of the check after the install, the images it uses and the addresses it tests. |
No. Run |
|
Every server directory |
Checks the server before the deploy: limits, DNS, free ports, reachability of other servers and space for images. |
No. Run it when a check fails. |
|
Every server directory |
A quick test that this server reaches the servers it depends on. |
No |
|
Every server directory |
The scripts that collect diagnostics and an inventory. |
No |
An archive with images also holds, in each server directory, images.tar.gz, images-packed.txt and
sometimes images.scope. images.tar.gz holds the images. images-packed.txt lists what is inside.
images.scope says that the archive holds only the third-party images. deploy.sh loads these images
and pulls the FT images from FT HUB as in an online install. Without images.scope, the archive holds
every image. See What "images inside the archive" means.
Download versus Deploy
This section compares the two ways the same bundle reaches a server.
| Action | What it does |
|---|---|
Download |
Creates the |
Deploy |
Sends the same bundle to every bound server over SSH. Then it runs |
Download and Deploy create the bundle in the same way, from the same answers. The only difference is who carries it to the server.
Pinned versions: the exact build of each image
This section explains what a pin is. It also shows what to do when a download or a deploy is refused because of a pin.
A version such as 7.1.3 is a tag in the registry. Someone can push a new build under the same tag later.
So a tag alone does not say which build you install.
A pin fixes this. A pin is the exact build (the image digest) that a version named when you chose it. The bundle then names each image by that build. A later push under the same tag does not change what you install.
DM records the pins in two cases:
-
You save an installation, and a version changed. DM asks the registry for the build of each changed version.
-
You click Pin these versions in Plan. DM asks the registry for the build of each version that has no pin.
Nothing is saved if the registry cannot answer for one version. DM never saves some pins and loses others.
In Plan, the Versions area shows a short digest next to each pinned version. The read-only Plan shows it too.
The mysql image has no digest. DM builds mysql on the server. It is pinned only by the content of the archive.
| Button in Plan | What it does |
|---|---|
Pin these versions |
Records the build that the registry names now for each version that has no pin. It also pins a companion service that nobody chooses. |
Take the new build |
Appears when a pinned tag now points to another build. It replaces the pin with the new build. The next delivery carries the new build. |
If a download or a deploy is refused
DM refuses to deliver a version that has no pin. The refusal names every service and tag that is the cause. Download and Deploy use the same check. API clients see the code in the first column.
| Code | Status | What it means | What you do |
|---|---|---|---|
|
409 |
At least one version has no pin. An image archive that was built before you pinned the version also gives this refusal. |
In Plan, Versions, click Pin these versions. Then download or deploy again. For an archive, build it again. |
|
503 |
DM could not ask the registry. The registry did not answer, or it refused the Harbor login of DM. |
Check that DM can reach the registry. Check the Harbor login in Settings. Then try again. |
|
409 |
The registry has no build of that version. |
On Versions, choose a version that the registry has. Then save or pin again. |
|
400 |
A request from a script sent |
Remove |
|
409 |
DM is already pinning this installation. |
Wait until it finishes. Then try again. |
If DM cannot read the list of services when you save, it saves the versions without a pin.
Every download and deploy then refuses them with image_unpinned. No unpinned version is delivered.
Pin from a script
A script can do what Pin these versions does. You need the role user or higher. A machine token cannot do this.
POST /api/compose/environments/<name>/image-pins
{"services": "unpinned"}
Use "unpinned" for every version that has no pin. Use a list of service names, for example ["ftacs"], to take the new build for those services.
DM answers with one row for each service:
[{"service": "ftacs", "tag": "7.1.3", "old_digest": null, "new_digest": "sha256:..."}]
The call is all or nothing. If one service fails, nothing is saved.
Warnings about a moved tag
A bundle always carries the pinned build. Before it delivers, DM asks the registry once more. Two warnings are possible:
-
image_pin_drifted: the tag now points to another build. Click Take the new build in Plan if you want it. -
image_pin_unchecked: DM could not check the tag. The bundle still carries the pinned build.
The warning does not stop the delivery. See Pin warnings in the deploy panel.
For a Download, a script reads the warnings in the X-Pin-Warnings header of the response.
Offline installs (no route to the registry)
This section explains bundles for a server that cannot reach the image registry. About half
of customer sites cannot reach the registry from the server you install. deploy.sh still
needs the container images on the server. Deployment Manager gives you two ways to do this.
What "images inside the archive" means
This section explains what the image list contains. Every bundle, online or offline, has a manifest. The manifest lists every image the install needs, for each server. It has two kinds of image:
-
images pulled from the registry, at the version this installation fixes
-
images that are built on the target machine from a base image
The second kind must be on the list. Without them, the manifest looks complete. But the services that build locally fail.
An offline bundle is the same archive with one images.tar.gz file added for each
server. That file holds every image in that server’s part of the manifest. At the site,
nothing more needs to be pulled. deploy.sh loads the images from the archive, not from
the registry. It also does not ask whether the servers can reach the registry.
How it is built
This section explains how Deployment Manager builds an offline archive.
-
On the card, press ↓ Download.
-
On the Configuration + images card, press Build with images.
-
The build starts in the background. It pulls every image the topology needs from the registry. It packs them into the same
.zip. -
Watch the progress. It is a real percentage, based on the image sizes. You can close the browser tab. The build continues. The installation’s card keeps showing the progress.
-
When the build is done, the card shows a link to the archive. The Configuration
images card shows Ready and ↓ Download the archive.
Know these four things before you start a build:
-
It refuses to start rather than filling the disk. There is a minimum amount of free space where bundles are kept. The default is 10 GB. An administrator can change it. Below it, the request is refused. The message gives the actual figure. It tells you to delete an old build or make the volume bigger.
-
A build that cannot fetch one image fails completely. It does not give you an archive with a missing layer. A missing layer is worst to find at a customer site with no internet.
-
One archive is built per server, and each one stands alone. So a layer that two servers share is fetched and stored twice. Plan disk space for the total of all archives.
-
Only one processor architecture is pulled. It is the one customer servers use. An image for the wrong architecture installs with no error. Then it fails at start-up. The error does not show the real cause.
Some problems stop a bundle from being created at all. They are reported at once, before the build starts. You do not wait three minutes into a download to see them.
When you press ↓ Download archive or ↓ Download the archive, or the archive link on the card, the button says Preparing the download until the file starts to arrive. The first download with one zip per server splits the archive first. For a large archive this takes a few minutes. When the file starts, DM says Download started, or opens the install steps. If nothing starts in 15 minutes, it says so. Look in your browser’s downloads.
You can download the finished archive in parts. If the download stops, it continues from where it stopped. This helps over a customer VPN. The archive comes with its checksum. With it you can check the copy you receive.
Rules of the download link. Always start the download with the Download button of the installation in Deployment Manager. The button asks DM for a link that works one time. The link is valid for 60 seconds. DM uses it once, to start the download. If the download stops, the browser can resume it with the same link for 24 hours. A link that was not used is dead after 60 seconds. If DM restarts, every link is dead and a resume is refused. Press Download again. A link that you copy and open from another site is refused. The message says "This download was started from another site, so it was not handed out." The hint says "Start the download from the Download button on this installation in Deployment Manager."
This build needs nothing from you except registry credentials. They must already be set up in Deployment Manager. It takes much longer than the configuration-only bundle: tens of minutes to an hour for a full topology. The finished archive is a few gigabytes. It is kept for seven days by default. An administrator can change this. After that, the tool deletes it the next time someone starts a build with images. Then the screen shows Deleted. Press Build with images to build it again.
The tool tells you if the archive still matches the installation. The build records the image versions it was made from. The screen names every service whose version has changed since then. An archive built before this record existed shows cannot be checked. That does not mean it is fine or out of date. It means the tool does not know. Build a new archive fetches all images again. After you press it, the old archive is no longer offered. For this reason it is not the main button on that screen.
A "ready" archive that is not there. Expect this failure after the tool itself restarts. The archives may be kept on storage that is lost on restart. Then the record still says ready, but the file is gone. The download says exactly this and names the cause. Build the archive again, and ask an administrator to fix the storage. See the environment variables.
Downloading the offline bundle counts as delivering the installation. You need write access to the installation. The archive carries that installation’s configuration.
An offline install also depends on two things that are easy to miss:
-
Some services are built on the target machine, not pulled. Their base images are in the archive too. An archive without them fails in the same way as one without an application image.
-
A successful load proves the archive was valid. It does not prove it held what this server needs. So after loading, the installer checks every image the manifest names.
What deploy.sh checks after the load
This section explains the check of pinned images on the customer server. docker load keeps the tag of an image
and drops its digest. So deploy.sh cannot ask Docker for the digest. It uses what the archive recorded.
After docker load, deploy.sh checks each pinned image:
-
the reference: the image has the name that the bundle expects
-
the digest: the archive recorded the pinned build for this image
-
the layers: the layers of the loaded image are the layers that the archive recorded
If all three match, deploy.sh trusts the tag on this server. It writes the file compose.pinned-local.yml.
That file names the checked images by tag. It also adds a COMPOSE_FILE line to .env.
So every later docker compose call in that directory reads this file.
If an image does not match, deploy.sh stops and starts nothing.
deploy.sh refuses in these cases. Nothing is started:
-
COMPOSE_PATH_SEPARATORis set to anything other than:, in.envor in the shell. Remove it and rundeploy.shagain. -
.envalready has aCOMPOSE_FILEline of your own that does not namecompose.pinned-local.yml. Remove the line, or move your files out of it. Then rundeploy.shagain.
A run that pulls from the registry removes compose.pinned-local.yml and its COMPOSE_FILE line.
The script that builds the image archive by hand has a check too. It skips a server if a pinned image does not get its tag. It lists the server as left alone. Fix the cause and run it again.
Do not run docker compose pull by hand on the server. It fetches the build that the tag points to now.
That build can differ from the pinned build. To change the images, run the DM bundle again.
|
Build the image archive by hand
This section explains the second way. You build the archive yourself, without Deployment
Manager pulling the images. Every bundle includes a script for this: a shell script and a
PowerShell version. It fills in the same images.tar.gz files.
-
Use a laptop or jump host that has Docker and a route to the registry.
-
Run the script there.
-
Carry the finished archive to the site in the normal way.
Use this in two cases. The bundle was created before the images were needed. Or you want to pull the images from a place that Deployment Manager cannot reach.
Options of pull-images
Run the script from the root of the unzipped bundle. The shell script is ./pull-images.sh. The
PowerShell script is .\pull-images.ps1. The script needs a running Docker daemon and gzip.
For each server, it reads images-manifest.txt of that server. It writes images.tar.gz and
images-packed.txt in the directory of that server.
Option in pull-images.sh |
Option in pull-images.ps1 |
What it does |
|---|---|---|
|
|
Packs only this server directory. You can repeat it. Without it, the script packs every server in the bundle. |
|
|
Overwrites an archive that is already there. Without it, the script leaves an existing |
|
|
Saves the images that are already in the local Docker. Use it when you just pulled or built the images and know they are current. |
|
|
The path of the Docker program. The default is |
|
none |
Prints the options. |
If the images are private, run docker login <registry> once before the script. The script does not
handle credentials. No password is stored in your shell history or in the bundle.
If an image is not in the local Docker after the pull, the script skips that server and lists the
missing images. At the end, it prints "packaged N server(s), M left alone". If a server had a problem,
it prints the problems and exits with code 1. Run it again. The servers that are already packed are
skipped. A half-written archive never stays: the script writes a .part file and renames it when
the archive is complete.
When the archives are ready, install on the site with ./deploy.sh --mode local --offline.
The option --offline of deploy.sh
--offline tells deploy.sh that the server has no route to a registry. deploy.sh loads every image
from the archives of the bundle and never pulls. If the archives are not there, deploy.sh stops with
the code image_pull and the message "--offline was given and this bundle carries no image archive to
load. Nothing on this server was changed." Run pull-images.sh where the registry is reachable. Then
copy the archive next to the bundle. When you start deploy.sh with no options on a terminal, it asks
whether the servers can reach the registry and prints the equivalent command for the next time. Use
./deploy.sh -h to list every option.
Carry the bundle to a server by hand
This section shows how to copy the archive to a server and unpack it. Use it when you did not press Deploy. You do this from a Linux or macOS machine. For a Windows machine, see From a Windows jump host.
You need the archive file, a login on the server, and bash 4 or newer on the server. The
server needs unzip or python3.
-
Copy the archive to the server. It lands in your home directory. Replace
<file>,<user>and<server>. The home directory needs room for the archive and for the unpacked copy.scp <file> <user>@<server>: -
Log in to the server.
ssh <user>@<server> -
Make a private directory, move the archive into it, check that you own it, and unpack it. Run this as one command. If one part fails, the rest does not run.
d=$(mktemp -d) && mv ~/<file> "$d"/ && cd "$d" && [ -O <file> ] && unzip -q <file> -d b && chmod 700 b && cd b && pwd -
If the server has no
unzip, use this command instead. It gives the scripts back their run permission.d=$(mktemp -d) && mv ~/<file> "$d"/ && cd "$d" && [ -O <file> ] && python3 -m zipfile -e <file> b && find b -name '*.sh' -exec chmod u+x {} + && chmod 700 b && cd b && pwd -
Run the installer from this folder.
./deploy.sh
Do not unpack in /tmp. Other accounts can change that directory. The installer refuses to
run as root from a directory that other accounts can change. For the login rules, see
Which login works.
From a Windows jump host
This section shows how to install from a Windows machine. A jump host is a machine you log in to first. From there you reach the customer’s servers. Use this section when your jump host runs Windows and the archive is an offline archive. Deployment Manager does not reach the servers in this case.
The idea is simple. The Windows machine copies the archive to one server. This server is the
hub. The installer then runs on the hub. It installs the hub, and it installs the other
servers over SSH. The questions are the questions of deploy.sh. See What the installer asks.
The hub installs every server, so it needs all servers in one archive. In the Download dialog, answer From one machine, over SSH, or press Download for one machine.
What you need for the Windows jump host
-
Windows 10 or newer.
-
tar.exe. Windows 10 and Windows Server 2019 or later have it inSystem32. The launcher uses it to read the zip and to split it per server. See The tar.exe that the launcher needs. -
An SSH client. The built-in OpenSSH client is on by default. PuTTY works too.
-
The offline archive as a
.zipfile on the Windows machine. -
A login that works on the hub. See Which login works.
-
A hub that can reach every other server on SSH (port 22).
-
On the hub:
bash4 or newer,ssh,scp,timeout,sha256sum, andunziporpython3. -
Free space on the hub in
/var/tmp. Plan for about twice the size of the archive, plus the install itself.
Steps to install through a hub from Windows
-
In Explorer, open the
.zipfile. -
Drag
deploy-windows.cmdanddeploy-windows.ps1out of the zip. Drop them next to the zip. -
Do not unpack the rest of the zip on Windows. Windows loses the file permissions of the scripts. The zip must go to the hub unopened.
-
Double-click
deploy-windows.cmd. -
If the bundle has more than one server, the launcher first asks Can the servers reach each other [y/N]. Type
yto use a hub. Typenor press Enter if you are not sure: then this machine installs every server itself. See Install every server from the Windows machine. -
Answer the next question: the hub. It shows a numbered list of servers. The first server is the default.
-
Answer the second question: your login on the hub. There is no default.
-
Type the password when the SSH client asks for it. The launcher never reads it.
-
Wait. The launcher copies the zip to the hub, checks it, and starts
deploy.shthere. It prints the name of a private directory on the hub. Write this name down. -
Answer the questions of
deploy.shin the same window. -
When the install is done, the launcher copies the credentials file back to the Windows machine. The file lands in the launcher’s own folder, next to
deploy-windows.cmd. -
The launcher asks: Remove the unpacked archive from <hub>? [Y/n]. Press Y to delete it.
If you close the window, the install on the hub keeps running. Open the view again with
-Attach (see below). While an install is still running, the launcher does not remove the
archive. It tells you to use -Attach.
How many passwords the hub install asks
If you use SSH keys, you type none. If you use a password, the SSH client on Windows asks up to four times. It asks once for each of these steps:
-
copy the zip to the hub
-
open the install session
-
copy the credentials file back
-
remove the unpacked archive
If the credentials file does not come back, the launcher does not offer the removal. It prints
the rm command instead. Then the client asks three times.
A server that needs a password adds one more prompt. deploy.sh asks it on the hub.
Options of the Windows launcher
You can give answers on the command line, so the launcher does not ask. Start it in a console.
| Option | What it does |
|---|---|
|
The hub name. Skips the first question. |
|
Your login. Skips the second question. |
|
The path of the zip. Use it when the zip is not next to the script. |
|
Plain text output, without the tab view. |
|
Opens the running install on the hub again. You can only watch. The name is the private directory name the launcher printed ( |
|
This machine installs every server itself, one after another. See Install every server from the Windows machine. |
|
For |
|
The private key to log in with: an OpenSSH key for OpenSSH, a |
|
The SSH client to use when both are installed. Without it, the launcher uses the Windows OpenSSH client first, then |
|
Choices for single servers that the launcher hands to |
If scripts are blocked
Some companies block .ps1 files. Then paste two commands into a Command Prompt
(cmd.exe). Do not use PowerShell. PowerShell changes the $ in the second command. The
README in the zip and the Install steps screen of the installation show both commands. The
Install steps screen fills in your hub and login. This is the shape. Replace every word in
angle brackets.
scp -o ForwardAgent=no <file>.zip <user>@<hub>:/var/tmp/<name>.zip
ssh -t -a -o ServerAliveInterval=30 <user>@<hub> "<remote command>"
Use these values:
-
<name>is a new name that only you use:ft-and the installation name and-and 12 hex digits. -
<sha256>is the hash of the zip in lower case. Get it withGet-FileHash <file>.zip. -
<kb>is the size of the zip in KB plus one tenth.
The remote command makes the private directory /var/tmp/<name>. It moves the zip into it
and checks that you own it. It unpacks the zip and makes the folder b private (chmod 700 b). Then it runs
deploy.sh --mode bootstrap --tabs --server-id <hub> --ssh-user <user>.
The remote command in the README also checks the SHA-256 hash and the free space. The remote
command on the Install steps screen does not. The screen does not know the hash or the size of
the archive. deploy.sh still names a full disk.
The Install steps screen keeps the same private folder name when you open the dialog again.
The name changes only when you press Start another run (new folder) or clear the ticks. Copy
both commands from the same screen. If mkdir says File exists, that folder was used before.
Press Start another run, and paste the two commands again.
The screen also gives a command to open the view of a running install again:
ssh -t -a <user>@<hub> "cd /var/tmp/<name>/b && exec bash deploy.sh --attach"
The section Previous runs lists up to five earlier folders, newest first. Each one has its credentials path, an attach command and a cleanup command. The cleanup command has this shape:
ssh <user>@<hub> rm -rf /var/tmp/<old-name>
Remove a folder only after that install has finished and you have saved
ft-credentials-<env>.txt.
If the hub is an IPv6 address, write it in square brackets in the scp line only. Example:
<user>@[<hub>]:/var/tmp/<name>.zip. Do not use brackets in the ssh line.
If the hub cannot reach a server
Before it changes anything, the installer checks every server. If the hub cannot reach one, the install stops. The message is: "<sid> cannot be reached from <hub>. Pick a hub that reaches every server, or ask for SSH from <hub> to <sid> to be opened for the install." Here <sid> is the server name and <hub> is the hub name.
You have four options:
-
Ask the customer to open SSH (port 22) from the hub to that server. The customer can close it again after the install.
-
Pick another hub that reaches every server. Start the launcher again.
-
Let the Windows machine install every server. See Install every server from the Windows machine.
-
Install each server on itself. Copy the zip to each server. Run
deploy.shthere. Do the servers in install order. See Carry the bundle to a server by hand.
Install every server from the Windows machine
Use this when the servers cannot reach each other over SSH, and only the Windows machine reaches
each of them. Start the launcher with -EachServer, or answer n to the question Can the servers
reach each other. Use the download Each server on its own or From one machine, over SSH.
Both work. The first one sends less data.
The launcher then does this:
-
It copies the zip to every server itself.
-
It checks every server before it installs anything.
-
It asks every question once, on the Windows machine.
-
It runs
deploy.shon each server, in the order of the bundle.
The launcher connects to each server several times. It tells you the number before it starts.
With a password, you type it at each connection. A key (-KeyFile) or an agent saves much typing.
Use Pageant with PuTTY or ssh-agent with OpenSSH.
Without -Logins and -User, the launcher asks if all servers use the same login. If not, it asks
one login for each server.
If the connection drops while a server installs, run the same command again with the same bundle.
deploy.sh finds its attempt marker and goes on. It does not repeat the finished steps.
Exit codes and refusals of the Windows launcher
When the launcher or a server stops, the message ends with (exit N) or names the code. The lines
above the message hold the reason. Use this table to find the cause and the action.
| Exit code | What the launcher says or means | What you do |
|---|---|---|
255 |
"the connection to <server> failed (exit 255): a wrong password, a host key that changed, or the network." |
Check the password, the host key and the network. If the install had started, it can still run. Open it again with |
83 |
"<server> has not enough free space in /var/tmp for the archive." The message for the hub also says how many KB the archive needs. |
Free space in |
82 |
The zip that reached the server has no |
Give the launcher the zip that you downloaded from Deployment Manager. For a hub, download with From one machine, over SSH. Nothing was installed. |
84 |
|
Use |
85 |
The launcher could not make a secret value on the server. |
Read the reason above the message. Run the same command again. |
86 |
The launcher refused a secret value: the name has a character other than a letter, a digit or |
Give a value that is not empty and has no single quote. |
87 |
The launcher refused the file path that a secret goes into, because it starts with |
Do not edit the files of the bundle. Download the bundle again from Deployment Manager. |
88 |
The launcher could not write the file of a secret on the server. |
Check the free space and the rights on the server. Run the same command again. |
89 |
|
Fix the owner of the directory. Or log in as a user that runs Docker and owns it. |
90 |
|
Start the launcher again. Nothing was installed. |
4 |
"stopped at a safe point (exit 4). The reason is printed above." When the launcher removes the unpacked archive, exit 4 means that an install still runs from it. |
Read the reason above. For a running install, use |
3 |
"refused to go on (exit 3). The reason is printed above." |
Read the reason above. Fix it and start again. |
5 |
"was force-stopped (exit 5)." |
Run the same bundle again. It asks how to continue. |
Any other code |
"stopped (exit N). The reason is printed above." |
Read the reason above the message. |
The tar.exe that the launcher needs
The launcher reads the zip with tar.exe of Windows. It looks in System32 first, then on the path.
With -EachServer and more than one server, the launcher needs tar.exe to split the zip per server.
If tar.exe is not there, the launcher stops with this message: "tar.exe was not found on this machine,
so the zip cannot be split per server. Use Windows 10 / Server 2019 or later, or download with All
servers in one archive ticked." In the Download dialog, that answer is From one machine, over SSH.
A zip of that kind has -all-servers in its name. The launcher accepts it without tar.exe. Then every
server receives the whole archive. If the archive holds images, it holds the images of every server. If tar.exe cannot read or split
the zip, every server also receives the whole archive. The launcher prints a warning then.
Good to know about the Windows launcher
-
PuTTY: set Translation to UTF-8, or the tab view shows broken characters.
-
The launcher uses
plinkandpscpfor PuTTY. It startsplinkwith-a, which turns off agent forwarding. Keys in Pageant still work. -
A server name must be safe to write into PowerShell. If it is not, the bundle has no launcher files. The README says why. Use the two paste commands or a Linux or macOS machine.
-
The launcher uses one login for all servers.
-
A login name cannot start with
-, and it cannot contain$.
What the installer asks
This section lists the questions that deploy.sh asks. deploy.sh runs with no arguments. It asks a
short, fixed set of questions. You can change every answer. Nothing is written until the
questions are done.
The questions of deploy.sh in order
The table below holds the key facts of every question. The full text of each question follows it.
| Question | Key fact |
|---|---|
Install all servers from here? |
Asked first, only when this machine reaches every other server over SSH without a password prompt. Yes installs all servers from here, one tab for each server. No installs this server only. |
Where are you running this? |
Asked when the first question was not asked. On one of the target servers installs this server only. On your own machine installs every server over SSH. |
Which of these servers is this machine? |
Asked on a target server whose host name does not say which server it is. Pick it by its name and address. |
SSH user for the servers |
Asked only after On your own machine. The account for every server. For one server with another account, write |
Install directory [/usr/local/ft-system] |
The directory for the compose file, the configuration and the container data. A new run with the same directory keeps the |
Wait for the containers to report healthy? |
Yes waits until every container is healthy. No stops when the containers have started. It is faster, but it does not show that the install works. |
Dry run first? |
Asked last, after every server was checked. Yes prints every command and changes nothing. Run again and answer No to install. Enter answers Yes. |
Log in with a password? |
Asked once, when a server does not accept a login without a password. Nothing is stored. No stops the install at that server. |
Continue? |
Asked only on an upgrade of an installation that Deployment Manager brought in from a server. Yes runs the step that cannot be undone. No stops with nothing changed. |
Do you have your own backup of this data, taken just before this upgrade? |
Asked only on such an upgrade, for a step whose data Deployment Manager cannot back up. Yes goes on. No stops with nothing changed. |
Has your own backup been made? |
Asked only when the backup of the database failed and an administrator allowed your own backup. Yes goes on. No stops with nothing changed. |
The last attempt was force-stopped. Continue it? |
Asked when the last run of this bundle was killed. Yes continues that attempt. No stops here. |
One password per secret |
Enter generates a strong password. For a password that the customer’s own system already has, Enter asks again. At the end, the installer writes |
Run post-install validation now? |
Asked once, at the end, only on the server that hosts the portals, only after a successful install and only at a terminal. Yes runs |
| Question | What the answer means |
|---|---|
Install all servers from here? |
Asked first, and only when the machine you run it on reaches every other server over SSH without a password prompt - it checks each one and prints a line per server. Yes installs all of them from there: one tab per server, and servers that do not depend on each other install at the same time. ←/→ switch tabs; q closes them without stopping the install, and ./deploy.sh --attach reopens them. No installs this server only. Servers that take only a password are not offered here - answer On your own machine at the next question. |
Where are you running this? |
Asked when it did not offer to install all servers from here. On one of the target servers installs this server only. On your own machine installs every server over SSH, with a key or with each server’s password. |
Which of these servers is this machine? |
Asked on a target server whose host name does not say which one it is. Pick it by its name and address. |
SSH user for the servers |
Asked only after On your own machine: the account it logs in as on every server. One server needs another account? Put SSH_USER_<server-id>=<user> before ./deploy.sh, with the dashes of the id as underscores. |
Install directory [/usr/local/ft-system] |
Where the install lives: the compose file, the configuration and the containers' data. Files are copied there, so the unpacked archive is only the delivery and can be deleted. Re-running with the same directory keeps the .env with this install’s secrets. |
Wait for the containers to report healthy? |
Yes waits until every container is healthy and names any that never gets there. No stops once they have started - faster, but it does not show the install works. |
Dry run first? |
Yes prints every command and changes nothing. Run again and answer No to install. Asked last, after every server was checked. Enter answers Yes. |
Log in with a password? |
Asked after On your own machine, once, when a server does not accept a login without a password. Yes: ssh asks for each such server’s password once and the install reuses that connection; nothing is stored, and the connections close when the install ends. A host key seen for the first time is shown before the password - compare it with the server’s. No stops the install at that server. |
Continue? |
Asked only when an installation brought in from a server is upgraded, before anything is changed, once for each step that cannot be undone and that an administrator already consented to in Deployment Manager. Yes runs it. 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? |
Asked only on an upgrade of an installation brought in from a server, for a step that cannot be undone and whose data Deployment Manager cannot back up. Yes goes on. No stops with nothing changed. |
Has your own backup been made? |
Asked only when our backup of the database could not be made and an administrator allowed continuing on your own backup. Yes goes on and the reason is recorded. No stops with nothing changed. |
The last attempt was force-stopped. Continue it? |
Asked when the last run of this bundle was stopped hard (killed), not at a safe point. Yes continues that attempt. No stops here; collect the inventory again to get a new bundle. |
One password per secret |
Enter generates a strong password - there are no defaults. Not for a password the customer’s own system already has (their MySQL, their ClickHouse): Enter asks again, so type the customer’s value. An optional secret stays empty on Enter. One value is offered instead: the FT ACS web-service password the image ships with; keep it unless it was changed in ft-configs. At the end the script writes ft-credentials-<env>.txt with every password it set. Save the values and delete the file - most of them exist nowhere else. |
Run post-install validation now? |
Asked once, at the very end, only on the server that hosts the portals, only after its install succeeded, and only when you are at a terminal. Yes runs ./validate.sh: it registers one test device in this installation’s ACS and deletes it again when it finishes, also after a failure or Ctrl-C. No skips it; you can run ./validate.sh there any time. |
After these questions, the installer asks for secrets separately, once per name. See how a secret’s answer is decided and the four reasons a password is refused.
Where an installation lives on the server
This section explains the install directory, and what happens if it is in use. You give the
install directory as an answer. Everything goes there: compose.yml, the environment files,
the mounted configuration, and all data the containers write. Before copying anything, the
installer checks what is already in that directory:
| What is found | What happens |
|---|---|
Nothing |
A fresh install. The archive’s files are copied in and the install continues as normal. |
This same installation, already there |
Updated in place. The install continues. The environment file already on the server is kept. It holds this install’s existing secrets. It is not replaced with an empty one. |
Another server of ours |
Refused. Two servers cannot share one directory. You must choose a different path. |
A compose file that this tool did not write |
Refused. The installer does not overwrite an installation it does not recognize. |
The installer checks only the server name, in the server-id file. It does not check which
installation the directory belongs to. Two installations made from the same topology use the same
server names. So use a separate directory for each installation.
The standard directory may be in use or not readable. Then the installer offers its own directory and tells you. A command written for the standard path will not find the install there. So write down which path was actually used.
Good to know about configuration files on a server
This section lists facts that help later.
-
Configuration files are protected once they exist on a server. Each configuration file in the bundle carries the checksum it was written with. A checksum is a short code calculated from the file’s content. With it, a later deploy can tell two cases apart. Either nobody touched the file, or a customer edited it by hand on the server. The deploy does not overwrite a file that was edited. See what a deploy does with that. That page also covers the one exception. A service’s own contract can set it for a specific file with
config_policy:(keeporreplace). An example is keeping a certificate a customer supplies.
If the dialog says the configuration files are not available
Deployment Manager (DM) needs the configuration files of some services. It fetches them from GitHub. If it cannot get them, it stops before it builds anything. A dialog opens when you press ↓ Download, Build with images or Deploy. Nothing was generated and nothing was sent to a server.
The dialog has one of two titles:
| Dialog title | What it means |
|---|---|
Configuration files are not available yet |
DM did not receive the files from GitHub. This is usually temporary. The list Services affected shows each service with the line "Not received from GitHub: try again." For Grafana Stack the line reads "Monitoring files not received from GitHub: try again." |
Configuration files are too large |
The files of a service are larger than DM accepts, so DM did not fetch them. The line reads "Too large to fetch: ask the team that owns it to make its configuration folder smaller." Asking again does not change this. |
If some services are not received and one is too large, the dialog shows both kinds of line.
The buttons:
| Button | What it does |
|---|---|
Try again |
Shown only when at least one service was not received. DM asks GitHub once more. While it waits, the dialog says "Asking GitHub for the files…". If the files still do not come, the dialog says "Still not available." Choose this first. It usually works. |
Download with the current files |
On a Download, this button goes on with the newest files that DM already has. On Build with images it has the same name. On a deploy the button reads Deploy with the current files. The files can be from a newer version than the one you install. The bundle says so. Read that warning before you use the bundle. For Grafana Stack, DM uses the monitoring files that it ships with. |
Cancel |
Closes the dialog. Nothing was sent. If you cancel while a retry runs, check the status of the installation before you try again. |
For a service that is too large, ask the team that owns the service to make its configuration folder smaller. Or go on with the current files.
If creating the bundle goes wrong
This section says where to look when creating a bundle fails.
-
The build refuses to start, or fails on one image: read the message. It names the reason. See How it is built.
-
The installer refuses the install directory: see Where an installation lives on the server.
-
For every message the tool can show, see When something goes wrong.