Step 5. Test the bundle

This page shows you how to test a bundle before you install it for a real customer. Test install creates temporary test servers. It runs the same installer on them that a real site uses. Then the tool removes the servers.

A wrong value found here costs you one more test run. The same wrong value found at the customer’s site costs a failed site visit. So test the bundle before a first delivery.

Before you start

This section lists what must be ready before you can start a Test install.

If the installation was imported, Test install rehearses the upgrade. See Test install of an imported installation: the upgrade rehearsal.

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

Steps to run one Test install

This section shows how to run one Test install.

  1. Open the Installations tab.

  2. Find the card of your installation. Press Test install. The Test install screen opens.

  3. Press Start test install. The tool creates the temporary servers. A checklist shows each step.

  4. When the servers are ready, press Send the bundle to the servers.

  5. The installer deploy.sh starts in the terminal on the screen. deploy.sh asks for every secret here, exactly as on the customer’s server. Type the answers.

  6. Wait until the install finishes. The screen shows a pass or a fail.

  7. Optional: press Run checks to check the installed services. After a first run the button says Run checks again.

  8. When you are done, press Delete test servers. This frees your slot for other people. Next to Keep 4 more hours, the button that frees your slot is named Release the test servers.

The checklist of the test servers shows the rows Test servers, Topology addresses and Registry credential. For a run whose start you did not watch, it can also show a row Pull platform. Inside the guided update journey, the button Skip the test install leaves this screen without a test.

If the install fails, the screen offers Run install again, Open shell to look, Explain this failure and Start a fresh test install.

Right after you create an installation, a dialog offers Run a test install. It opens the same screen.

When the test install stops on a question

This section explains what happens when you answer a question on the Test install screen.

The test install can stop on a question of the installer. The screen then shows the answers as buttons. See it in Questions opens the same question in Questions.

Only the backup question is saved from here. DM saves your answer in Questions. So the next test install and the real install do not ask it again. The screen says: "Saved. Your answer is saved in Questions too, so the real install will not ask it. Run the test install again to use it." Press Run test install again.

Your answer does not make the Server check result out of date.

In these cases nothing is saved:

The screen says What to do

Answer this question in Questions, then run the test install again. It is not saved from here.

Any question other than the backup question. Answer it in Questions.

Going on without a backup needs your own confirmation. Answer it in Questions, then run the test install again. Nothing was saved.

No backup needs your confirmation. Answer it in Questions.

This question is from older settings. Run the test install again.

The settings changed after this test install started. Run it again.

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

Ask a support_admin or a global_admin to answer it. For a step that cannot be undone, the answer buttons are off for you.

What it checks, and what it never touches

This section explains what a Test install checks and what it never changes.

A Test install runs the installer of the bundle in bootstrap mode. It runs it only on servers this tool creates for the run. It is the same script that a real site sees. It asks the same questions in the same order.

What it proves: the bundle, the configuration in it, and the install script. It proves that the compose files, the configuration trees and the images pull, start and pass their health checks together.

What it does not prove: the customer’s network, their storage, their firewall, or their hardware. None of those exists on the test servers. A green Test install answers "will this bundle install". It never answers "will it work at that site". For this reason, the readiness checks still run against the real servers on the deploy that follows. They can still refuse.

Run it before a first delivery. It never fixes an installation that is already live and broken. The test servers have none of the state that makes that installation fail. For that case, see Step 7. Check that it works.

It never touches:

  • The installation’s own bound servers. The test servers are created new for the run. They belong to no customer. The servers you will really deploy to are never involved.

  • A customer’s site. There is no SSH connection to anywhere except the temporary servers.

  • The installation record itself. A run, pass or fail, changes nothing about the installation. Never delete or recreate an installation because a Test install failed.

You type every secret fresh on the test servers. None of it is carried forward. Later you deliver the bundle for real, by download or by deploy over SSH. Then every secret is asked again on the real server. A value typed into a test run never reaches a customer’s machine.

Test install of an imported installation: the upgrade rehearsal

This section explains what Test install does for an installation that you brought in from a site. See Bring an existing installation under Deployment Manager.

What a rehearsal is

An imported installation already runs at the customer’s site. The new bundle will upgrade it. So Test install does not start from empty servers. It does two things in this order:

  1. It builds a copy of the current state of each server on the test servers. The tool reads the copy plan from the stored inventory of the site.

  2. It installs the same bundle that the customer gets over this copy. It uses deploy.sh in bootstrap mode, as on the site.

The test servers install only the bundle that Deployment Manager makes for this installation. When you send the bundle, the tool makes the bundle again itself and sends its own copy to the test servers. It does not use the files inside the bundle that the browser sends, so an edited deploy.sh never reaches the test servers. It only checks that the browser sent a bundle at all.

This is a rehearsal of the upgrade. The result tells you if the upgrade works. It also tells you when the test servers could not copy the current state.

A Test install does not rehearse a merge. This file is merged on the customer’s server; the lab installs DM’s file. See Show the differences and merge a file.

An installation that Deployment Manager created is not imported. Its Test install does not change. It follows the steps in this page without a rehearsal.

Step 1: see what the lab can copy

The lab is the set of test servers. Before you press Start test install, step 1 shows What the test servers will copy first. Each server has a list of parts of its current state. Examples are the install folder, the images, the environment files, the secrets and the databases. Every part has one of three states:

State What it means

Reproduced

The lab copies this part of the current state.

Not reproduced

The lab cannot copy this part. The reason is shown next to it.

Not checked

The tool could not find out. For example, it could not ask the image registry. This is not the same as "absent".

While the copy runs, the title is What is being reproduced. A log shows the progress. The copy can take several minutes. If you leave the screen, the copy does not stop. After the copy, the title is What was reproduced. A part that is not yet known shows Not yet checked.

The tool never shows a missing part as a pass.

The progress of the copy

While the copy runs, the title is Copying the current state. The screen shows how many items are done, for example "3 of 12 items". It also shows how many servers have finished. It shows the time that the copy started, and the longest time that the copy can take.

Each server has its own line. The line shows one of these texts:

Text What it means

Pulling N images · started 11:42, up to 20 min

The server pulls its images. It has nothing else to report yet. The time is the start time and the longest time for this step.

Starting the containers

The server starts the copied containers. The line also shows the start time and the longest time.

Checking the databases

The server checks the databases. The line also shows the start time and the longest time.

N of M done

The server copies the items of the list. N items are finished.

Finished · N of M copied

The server finished. The text can add how many items were not copied.

Stopped with an error after N of M items

The copy stopped on this server. N items were done before it stopped.

Press the line of a server to see each item. An item that is not done yet shows Not yet copied. A finished item shows Copied, Not copied or Not checked. The fold Copy log shows the log of the copy. The fold Not part of this test lists what this test does not cover.

If you open the screen after the copy started, the screen cannot show the progress. It then moves on by itself when the copy finishes.

What the lab never copies

The lab never copies these items:

  • The contents of config files. The inventory stores only the file names.

  • Command arguments. The inventory has no values for them.

  • The rows in the customer’s databases. The lab copies the database structure when it can. It never copies customer data.

  • Containers that are not part of the installation, and other compose projects.

  • A config file that you merged in Deployment Manager. This file is merged on the customer’s server; the lab installs DM’s file.

  • Passwords that two or more of the customer’s servers share. Each test server gets its own value. A connection between two servers can fail in the lab and still work on the customer’s servers.

Each of these items shows as Not reproduced.

The lab does copy the logins of the services. The lab starts with empty databases. It creates the login of each service in them, so the services can connect. If the lab cannot create one of these logins, the screen says "the lab could not create this database login" next to it. The lab starts the copied containers the same way their images start them.

Where the lab gets the old images

The lab pulls the old images from two places only: our Harbor registry and Docker Hub. Each image gets one state, as follows.

  • An image that is in Harbor is Reproduced.

  • An official Docker Hub image, such as mysql, is Reproduced. The lab pulls it straight from Docker Hub. This is true for every official image, but only with a fixed tag.

  • A ClickHouse image from the clickhouse namespace on Docker Hub is Reproduced. The ClickHouse JDBC bridge is also pulled from there. The lab pulls it with its fixed tag.

  • Any other image from Docker Hub or from another registry is Not reproduced. The reason is that the image is not mirrored in our registry.

  • An image with the tag latest is Not reproduced. The tag latest does not name one exact image, so the lab never pulls it.

  • An image that Harbor should have but does not have is Not reproduced. The reason is that the image and tag are not in our registry.

  • If Harbor cannot be asked, the image is Not checked.

A service that the customer built on the server has no image to pull. The lab runs the base image of the build in its place. If the tool cannot name that base image exactly, the service is Not reproduced. The reason is that the service is built on the server.

A customer database server usually runs an official image. So the lab now starts a real database for it. If an image is still Not reproduced, the rehearsal can end with Test servers could not reproduce the current state. See The five results.

If an image in Harbor has a different id than the image on the customer’s server, the screen shows a fold Warning: (number) images differ from the customer’s servers. The fold has a button Copy full ids. A table lists the service, the expected id and the lab id. The lab then tests different image bytes for these services. Treat the result with care.

Steps to rehearse an upgrade

  1. Open the Test install screen of the imported installation.

  2. Read the copy plan in step 1.

  3. Press Start test install. The tool starts the copy.

  4. Wait until the copy ends. The step is named Copy of current state. The steps on the left are Before you start, Test servers, Copy of current state, Install and Result.

  5. Press Send the bundle to the servers.

  6. Watch the install in the terminal. You do not answer questions there: see The questions the lab answers for you.

  7. Wait for the result.

The lab holds the current state for one install only. The install counts from the moment it starts, not from the moment it ends. After it starts, the header says Installing until the result arrives, and step 1 says: "This lab has been used by one install, so it no longer holds the current state." The buttons Run install again and Send the bundle again are hidden. If you reload the page or close the tab after the install started, the install keeps running. Open the test install again to watch it and to see its result. If the test-server service loses the install on the way, the header keeps saying Installing and no result comes. To rehearse again, press Delete test servers and start again.

The bundle that the lab installs is the bundle that ↓ Download gives you, with the same check. If the check finds an error, the lab refuses the bundle in the same way. Only an admin can accept the errors, as for a download.

If the test-server service could not open the install at all (for example, it could not connect to the test servers), no install ran. The lab still holds the current state and you can start the install again.

The questions the lab answers for you

An upgrade of an installation that was not made by Deployment Manager asks questions on the site. The test servers install without a terminal for each server, so the lab answers two of these questions in advance. It writes the answers only into the lab copy of each server’s adoption.tsv. The bundle that you download for the customer does not change.

Question What the lab answers

Make a backup before the upgrade?

No backup, the same as --no-backup. The backup check is shown as Not checked. It is never shown as passed.

A container has another name than the bundle gives it

The lab confirms the name of the container that it copied. The result says how many items the lab answered for you. These names are not reproduced in the lab.

Any other question of this kind stops that server. Its result is Stopped before it finished.

If the copy fails, the screen says that the test servers could not be set up as a copy of the current state. This does not show if the upgrade works. The bundle was never installed. The only action is Delete test servers.

The five results

The result has one of five outcomes. The color and the icon repeat the words.

Result Color What it means

Upgrade failed

Red

The upgrade failed on a server. Every part that this failure depends on was copied exactly. So the problem is in the upgrade, not in the lab.

Test servers could not reproduce the current state

Info

The install failed, and the lab did not copy the parts that matter. This does not show if the upgrade works. The text names the servers and the parts. It can also say that the test servers ran short of memory or disk, or that an image could not be pulled.

Test upgrade passed, not everything reproduced

Amber

The install passed. The text says how many parts of the current state were not reproduced. This is a good sign, not a guarantee.

Test upgrade passed

Green

Not reached by a rehearsal. The lab answers the backup question itself, so the backup check is always Not checked, and a passed install is at best Test upgrade passed, not everything reproduced. A Test install of an installation that Deployment Manager created does not show these five results.

Stopped before it finished

Neutral

The install stopped on a question or on an answer, or the tool could not read the result file of the install. This shows nothing about the upgrade.

The result is a table with two columns: Server and Result. Under the result of a server, the table shows what stopped that server. Two results have their own words:

  • Result not read: the install ran, but the tool could not read the result file of this server.

  • Not confirmed as finished: the tool could not confirm that the install finished on this server.

Both results show nothing about the upgrade.

The result shows each server on its own. The most serious server result is the result of the run. A stop on one server never hides a real failure on another server.

The tool reads the result from a file that deploy.sh writes on the test servers. It does not read the result from the terminal. Text that you type in the terminal does not change the result.

The adoption checks of deploy.sh print two more machine lines when they refuse, on the customer’s servers too: ADOPT_REFUSED|<server>|<check>|<subject>|<what> for each refused check and ADOPT_SAID|<server>|<sentence> for each sentence a person reads. Only a rehearsal reads them. On a site they are part of the output and change nothing.

While the tool works out the result, the screen shows Working out the result.

What a refusal in the lab means

The installer checks the server before it changes anything. A check can refuse to go on. In the lab, a refusal can have two causes. The upgrade can be wrong, or the lab did not copy something that the check needs.

An example is the rows of the customer’s databases. The lab never copies them. A check that needs those rows can refuse in the lab. The same check does not refuse on the customer’s servers.

The tool compares each refusal with the parts that the check depends on.

  • If the lab copied every one of these parts exactly, the result is Upgrade failed. The problem is in the upgrade.

  • If the lab did not copy one of these parts, the result is Test servers could not reproduce the current state. The problem is a gap of the test install. It is not a fault of the installation.

If you see Test servers could not reproduce the current state, do these steps:

  1. Read the text under the result. It names the servers and the parts that the lab did not copy.

  2. Do not change your answers on the Differences step because of this result.

  3. Do not change the password choices because of this result.

  4. Check the same item on the real servers, with the readiness checks of the real deploy.

When the rehearsal refuses to start

The tool refuses before it creates any test server. No slot is held.

Message What to do

The test-server service cannot rehearse an upgrade.

The lab-runner is old or cannot be reached. An administrator must update the lab-runner first. An old lab-runner is refused. The tool never falls back to a fresh install for an imported installation.

The lab host does not have enough free memory for this rehearsal.

Run it on a lab host with more memory, or delete other test runs. The message gives the memory needed and the memory free. The needed value is a minimum.

The rehearsal runs on the test-server service. It never runs on your laptop.

The warning about the customer’s other database servers

This section explains a warning that you can see in a Test install. It appears only when the customer runs the database on several servers, and you typed an address for a server other than DB_HOST.

The Test install screen shows this text, when at least one server has an address:

"In a test install the other database servers are usually not reachable from the lab, so preflight shows a warning for each other database server it checks. It does not stop the test."

The text is not shown when no server has an address. It is also not shown when the only stored address is out of date, or when the tool cannot read the installation.

The warning is the same as in a real install. See the warning about the customer’s other database servers. It never stops the test.

What you see: how it differs from a real install

This section lists the ways a Test install is different from a real deploy.

  • Delivery mode, not SSH deploy. A Test install runs the installer in the "carried to site" mode. This is the mode you use when you download a bundle and install it by hand. It is not the SSH-deploy mode used on a real customer’s servers.

  • Real servers, not a script dry run. The test servers are real, running containers. This is not a --dry-run. The images really pull and the services really start.

  • Two different limits, and only one of them is shared. An installation can have one active Test install at a time. A second start on the same installation is refused as a conflict. It is not queued. Separately, the test servers come from a small pool. Every installation and every operator share this pool. A refused start most often means the pool is full, not that something is wrong. The pool size is the number the test server service reports. If the tool cannot ask it, the size shows as not known, never as 0 of 5.

  • No consent step for reading its own evidence. On a real deploy, the tool asks you before it opens SSH to collect evidence from a customer’s server. The test servers were made by this tool minutes earlier, for this run only. Their failure evidence (the terminal transcript, secrets masked) is already in the browser. There is nothing more to fetch.

Good to know: what it costs and how long it lives

This section explains how many resources a run uses and how long it stays.

A Test install uses one of the five shared slots while the run is active. The occupancy list in the Installations header shows how many of the five are in use, and by which installation. Look there first if a start is refused. It tells you if the pool is full.

A run stays alive when you close the tab and open it later. You can also reach it by a direct link. Leaving the screen does not stop the run or the install inside it.

The test server service decides how long the servers of a finished run are kept. There are two cases:

  • It states the number of hours after which servers are deleted automatically.

  • Nothing deletes them. It says so plainly. A run then holds its slot until someone deletes it by hand.

The panel always says which case is true for its pool.

Keep the test servers longer

In the first case, the screen says when the servers are released: "Test servers ready until <time> (local time)". If you need them longer, press Keep 4 more hours.

  • Each press adds 4 hours. The time counts from the release time shown, or from now if that time is past.

  • You can keep the servers until 24 hours after they started, not longer. If 4 more hours would pass that limit, the press keeps them up to the limit only.

  • When the release time is already at the limit, the next press is refused. The screen says: "These test servers can be kept until <date> <time> UTC at most." Nothing changes.

  • When the time limit is reached, the screen also says: "Other test installs share these servers. Release them when you are done, and start a new test install if you need more time." If the service sends no readable time, the screen says: "These test servers cannot be kept any longer."

  • One press can keep the servers for 1 to 4 more hours. The button always sends 4 hours. Any other number is refused with "Test servers can be kept for 1 to 4 more hours at a time." and the hint "Press Keep again for more time."

  • If the test server service refuses the keep for another reason, the screen says: "The test servers were not kept: the test-install service refused." The hint is "Try again in a few minutes."

  • If the test servers are not running, the screen says: "These test servers are not running, so there is nothing to keep." The hint is "Start a test install first."

  • If the test server service is older, the screen says: "Keeping test servers longer is not available on this test-install service yet." Ask whoever runs this Deployment Manager to update it.

  • If the test server service restarts, the extra time can be lost. The servers then go back to their normal release time.

Example. The test servers started at 09:00. The screen says they are ready until 15:00. The limit is 09:00 the next day. You press Keep 4 more hours six times, each time before the servers are released.

Press Ready until

1st

19:00

2nd

23:00

3rd

03:00 the next day

4th

07:00 the next day

5th

09:00 the next day: only 2 hours, because this is the limit

6th

Refused: "These test servers can be kept until <date> 09:00 UTC at most."

The screen shows the ready time in your local time. The refusal shows the limit in UTC. In this example, both are in UTC.

The last finished Test install for a bundle is shown in three places:

  • next to the installation,

  • on the first step of the Deploy flow,

  • on the checklist of the Download flow.

It shows pass or fail, and how long ago. A bundle can change after a Test install ran on an earlier version of it. Then a pass is shown as stale, not as a current pass.

What it needs to be available at all

This section lists what an administrator must configure before Test install works.

Test install is a separate feature. A second service creates the temporary servers. Three settings must be configured on the Deployment Manager side, or nothing can be started:

  • The connection to that service: its address and a shared secret. If either one is missing, nothing can be started. The screen says test installs are not set up here. It does not report a failed request.

  • The key Deployment Manager uses to encrypt the temporary SSH keypair it creates for each run. If this key is missing, the same request fails for a different reason. The message names that reason.

Test install needs a bundle to install on the test servers. So Test install is greyed out on a card that has no servers bound yet. Its message is separate from the message for Deploy, which is greyed out for the same reason.

If something goes wrong: the four reasons it refuses to start

This section lists the four ways a start can fail and what to do for each.

A failure here is about the test servers, never about a real installation. None of the four means an installation is broken. None of them means anything was sent anywhere.

What happened What to do

The temporary servers were being created and the run stopped part-way.

Read the checklist step that tracks the server creation. It names which step stopped and what is still there. Use it to decide: start again from scratch, or retry only the part that failed. Do not delete the installation because of this.

The service that creates test servers refused the request before creating anything. The usual reason is that every slot is already taken.

Open the occupancy list (in the Installations header) to see who holds the slots. Start again when one is free. Nothing of yours was touched. No bundle was sent anywhere.

The connection that carried the start closed before a result arrived. The temporary servers may be up, or may not be.

Open the installation’s Test install screen again. It asks for the occupancy list again and shows what is really running. Do not start a second run first. A lost run holds a slot that nobody can find.

A request to delete the test servers did not succeed.

Check the occupancy list. If the run is still listed, ask the person who runs the test server service to clear it. The slot can look free here while the servers are still running.

For every message the tool can show, see When something goes wrong.