Skip to content

Update an installer installation

guidemaintain-updating-cloud-installer

Upgrade an installation that the AWS or Google Cloud installer made to a new version, or change its settings, with the same installer.

The installer that made the installation also updates it: to a new version of Platforma, or to new settings. You give it all parameters of the installation again, so the installation stays the same except for what you change. On AWS, the stack keeps the parameters, and a change set shows what the update will change before it starts. On Google Cloud, you run install.sh again with the answers that you saved at the installation (see Steps). The database, the workspaceworkspace — The storage where the Backend and all jobs keep the working files of running jobs. The Backend and the jobs use it at the same time. In Kubernetes, it is a network file system; in Single Server mode, it is a folder on the server. Glossary and the results stay.

For an upgrade, this page replaces only the step “Upgrade” of Upgrade Platforma: do the steps before and after the upgrade there.

Before you start

  1. For an upgrade, do the steps of Before the upgrade: read the release notes, write down the version that runs now, check the health of the installation, tell the users and make a fresh backup.

  2. Have the parameters of the installation.

    Tool: CloudFormation template

    The stack keeps all parameters. Have the values of the secret parameters in case you change them: the stack shows **** for them. A changed secret value also needs a larger SecretsRevision. See the last step of the installation in Steps.

  3. Have the rights of the installation. An update needs the same rights as the installation: see Permissions. On Google Cloud, each run of install.sh needs the role roles/config.admin (Infrastructure Manager Admin). On AWS, the steps with kubectl also need an EKS access entry: see Change a secret. The installer checks its permissions first. When one is missing, it stops before it changes anything and shows the command that grants the role.

Upgrade to a new version

Tool: CloudFormation template

A new release has a new template at the same address. The template holds the version of the BackendBackend — The server program of Platforma. It keeps the projects, runs the Blocks and starts jobs. Glossary, and the versions of the cluster services (KueueKueue — A Kubernetes add-on that holds jobs in a queue until the cluster has free CPU, memory and GPU for them. Glossary, AppWrapperAppWrapper — A Kubernetes add-on that wraps the pods of one job into a single unit, so that Kueue admits and starts them together. Glossary, Cluster Autoscaler, the load balancer controller and External DNS). With a change set, you see what the update changes before it starts.

  1. Create a change set. In the CloudFormation console, select the stack and choose Stack actions → Create change set for current stack. Choose Replace current template → Amazon S3 URL, and paste the same template URL as for the installation: it always gives the last release.

    https://platforma-cloudformation.s3.eu-central-1.amazonaws.com/cloudformation-eks-1-35.yaml
  2. Keep the parameters. CloudFormation shows the current values: change only what you want to change. The secret parameters show **** and keep their values. When PlatformaVersion has a value, clear it: a fixed version stays after the update, and an empty one gives the version of the new template.

  3. Accept and create. Keep the stack options, accept that the stack makes IAM resources, and choose Submit. Result: the change set has the status CREATE_COMPLETE.

  4. Review the changes on the tab Changes. Each line is a resource, with its action and whether CloudFormation replaces it:

    • TriggerPlatformaDeploy with the action Modify: the Backend gets the new version. TriggerHelmDeploy with Modify: the cluster services get new versions.
    • A node group (NodeGroup in the name, for example SystemNodeGroupV5) with the action Modify, Add or Remove: its nodes are replaced or removed, and the jobsjob — One run of a tool on data. The Backend starts jobs on the server where it runs, or in a Kubernetes cluster. Glossary on them fail. Execute the change set when no job runs.
    • Replacement True for the cluster (EksCluster), the network (Vpc, the subnets), the bucket (S3Bucket) or the file system (EfsFileSystem): do not execute the change set. Delete it and contact MiLaboratories support.
  5. Execute the change set. Choose Execute change set. Result: the status of the stack is UPDATE_COMPLETE.

To get each new version of the Backend, create a change set with this template again. Then do the checks of After the upgrade.

Change settings

To change a setting, run the update with the new value and all other values as before. The Configuration pages describe the Terraform modulesTerraform modules — The Terraform code that MiLaboratories provides to install Platforma. The cloud-specific Terraform modules make the cluster and its cloud parts in AWS or Google Cloud; the cloud-agnostic Terraform modules install Platforma into the cluster. Glossary, the Helm chart platforma-backend and Single Server mode: for the AWS parameter and the Google Cloud variable of each setting, see Settings and their parameters.

Tool: CloudFormation template

  1. In the CloudFormation console, select the stack and choose Stack actions → Create change set for current stack → Use current template.
  2. Change only the parameters that you want to change: CloudFormation keeps the values of all others. When you change a secret parameter, also set SecretsRevision to a larger number. Accept that the stack makes IAM resources, and choose Submit.
  3. Review the changes, as in Upgrade to a new version, step 4, and execute the change set. Result: the status of the stack is UPDATE_COMPLETE.

To get a new version of Platforma at the same time, choose Replace current template instead: see Upgrade to a new version.

Before you change a setting, know these effects:

  • Secret parameters (AWS). The stack keeps the values of the secret parameters in Secrets Manager, and the deployer of Platforma does not get them. Thus a change of a secret value alone does not apply it. In the same update, set SecretsRevision to a larger number: for example, from 1 to 2. The secret parameters are LicenseKey, HtpasswdContent, LdapSearchPassword, GoogleClientSecret, and the access keys and secret keys of the data libraries. For each secret, see Change a secret.
  • Data libraries. Give the full list each time. The installer removes the libraries that you leave out. To remove a library that projects use, see Remove a data library.
  • Sign-in providers. When you add or remove a provider, all users must sign insign in — To show the Backend who you are, with a sign-in provider or a single-user token. The verb is "sign in"; the noun and the adjective are "sign-in". Glossary again one time. To move users from one provider to another, see Migrate between sign-in providers.
  • Deployment size. On Google Cloud, a larger size makes new quota requests.
  • Settings that make new infrastructure. On AWS: ClusterName, PlatformaNamespace, the VPC and subnet parameters, S3BucketName and SystemNodeAZ. On Google Cloud: REGION and ZONE_SUFFIX. A change of these settings replaces the cluster, the storage or the disks of the Backend: treat it as a new installation. On Google Cloud, a new DEPLOYMENT_NAME, PROJECT_ID or IM_LOCATION makes a second installation.

Change a secret

Change a secret with the installer that made the installation, not with kubectl alone. The next run of the installer writes its own values into the Secrets again. For the master secret, which signs out all users, see Change the master secret.

Make the new key before you remove the old one. Keep the old key valid until the check is complete: at the identity provider, in the cloud of a data library or at the license service. Then remove the old key. A restart of the Backend is a short outage: see Restart of the Backend.

Tool: CloudFormation template

The stack keeps the secret parameters in AWS Secrets Manager, and the passwords that it makes in Parameter Store. The commands use the namespace platforma: with another PlatformaNamespace, use its value.

SecretWhere you change itKubernetesKubernetes — A system that runs programs on a group of machines (a cluster). Platforma can run in a Kubernetes cluster. Glossary SecretRestart of the Backend
License keyParameter LicenseKeyplatforma-licenseDo step 3
Static list of usersstatic list of users — A sign-in provider that is a file with the logins and the password hashes of the users, in the htpasswd format. The Backend reads it again when it changes. GlossaryParameter HtpasswdContentplatforma-htpasswdNot necessary: the Backend reads the list again in 1 to 2 minutes
Password of the login platforma (administrator)Parameter Store, /<ClusterName>/platforma/admin-passwordplatforma-admin-htpasswdNot necessary
Password of the list that the stack made when HtpasswdContent is emptyParameter Store, /<ClusterName>/platforma/users-passwordplatforma-htpasswdNot necessary
LDAPLDAP — The directory of users of a company. The Backend can check logins and passwords in it. Glossary search passwordParameter LdapSearchPassword—The stack update restarts the Backend
Google client secretParameter GoogleClientSecretplatforma-sso-client-secretDo step 3
Keys of data library N (1 to 3)Parameters DataLibrary<N>AccessKey and DataLibrary<N>SecretKeyplatforma-library-<N>-credsDo step 3
  1. For a password in Parameter Store only, write the new value. Use the ClusterName and the Region of the stack:

    Terminal window
    aws ssm put-parameter --name "/<ClusterName>/platforma/admin-password" \
    --type SecureString --overwrite --region <Region> --value '<new password>'

    For the other list, use /<ClusterName>/platforma/users-password.

  2. Update the stack with the current template. Follow Change settings. Give the new value of each secret parameter that you change. Set SecretsRevision to a larger number than its value in the Parameters tab of the stack, for example from 1 to 2. Without a larger SecretsRevision, the stack does not give the new value to the Backend. Result: the status of the stack is UPDATE_COMPLETE.

  3. Restart the Backend when the table says so. The kubectl commands need an EKS access entry for your IAM principal: see Access to the cluster.

    Terminal window
    aws eks update-kubeconfig --name <ClusterName> --region <Region>
    kubectl rollout restart --namespace platforma deployment/platforma
    kubectl rollout status --namespace platforma deployment/platforma

    Result: deployment "platforma" successfully rolled out.

  4. Check that the Backend uses the new value. See Check the change.

Access to the cluster

The kubectl commands work only for an IAM principal with an EKS access entry of the cluster. The stack gives an access entry with the administrator rights of the cluster to the principal that created the stack. Another operatoroperator — The person who installs and runs Platforma in your company, for example an IT engineer or a bioinformatician. Glossary makes an access entry for their own IAM role, with the rights of the installation (see Permissions). This entry gives the role administrator rights in the namespace platforma only:

Terminal window
aws eks create-access-entry --cluster-name <ClusterName> --region <Region> \
--principal-arn arn:aws:iam::<ACCOUNT_ID>:role/<role name>
aws eks associate-access-policy --cluster-name <ClusterName> --region <Region> \
--principal-arn arn:aws:iam::<ACCOUNT_ID>:role/<role name> \
--policy-arn arn:aws:eks::aws:cluster-access-policy/AmazonEKSAdminPolicy \
--access-scope type=namespace,namespaces=platforma

Use the ARN of the IAM role, not the assumed-role ARN that aws sts get-caller-identity shows.

You can keep the static list of users yourself: the Secret platforma-htpasswd, with an empty parameter HtpasswdContent. The stack does not change such a Secret, so replace it with kubectl. See Static list of users.

Check the change

Connect kubectl to the cluster. On AWS: aws eks update-kubeconfig --name <ClusterName> --region <Region>. On Google Cloud: gcloud container clusters get-credentials <DEPLOYMENT_NAME>-cluster --location=<REGION>-<ZONE_SUFFIX> --project=<PROJECT_ID>. Then do these checks:

  1. The Kubernetes Secret holds the new value. Do this check for keys only. A Secret with a password holds a hash, so check a password when you sign in (check 3). For example, for the license key:

    Terminal window
    kubectl get secret platforma-license --namespace platforma \
    -o jsonpath='{.data.MI_LICENSE}' | base64 -d; echo

    For the other Secrets, use the key of the Secret: client-secret, password (the LDAP search password), access-key or secret-key.

  2. The Backend started after the change, where a restart is necessary. The AGE of its pod is shorter than the time since the change:

    Terminal window
    kubectl get pods --namespace platforma \
    -l app.kubernetes.io/name=platforma,app.kubernetes.io/instance=platforma
  3. The function works with the new value:

    • license key: kubectl logs --namespace platforma deployment/platforma | grep "License is OK" shows the line;
    • a password or a sign-in secret: sign in with the Desktop AppDesktop App — The program that each user installs on their own computer to work with Platforma. It is a client of the Backend. Glossary as a user of that sign-in provider. For example, use the login platforma with the new administrator password;
    • keys of a data library: in the Desktop App, add a dataset from the library and see its files.

When the check is complete, remove the old key at its source.

What an update keeps and restarts

An update keeps the data and the secrets of the installation: the database, the workspace, the primary storageprimary storage — The bucket (Amazon S3 or Google Cloud Storage) or folder where Platforma keeps all results and uploaded files. Glossary with the results, the master secret, and the passwords that the installer made. On AWS, these passwords are in Parameter Store, under /<ClusterName>/platforma/. On Google Cloud, they are in Secret Manager.

The Backend restarts only when its version or its values change: the old Backend stops, then the new one starts. The Desktop App loses its connection for a short time and connects again by itself, and jobs that run in the cluster continue.

Tool: CloudFormation template

The stack installs Platforma again only when the version or a parameter of Platforma changes: an update with the same values does not change Platforma. A changed secret parameter is an exception: the stack applies it only when SecretsRevision also gets a larger number (see Change settings). When the template has new versions of the cluster services, or other node groups, the stack also installs the cluster services again. A change of the infrastructure parameters changes only the infrastructure.

When the update fails

Tool: CloudFormation template

The stack waits 15 minutes until the new Backend is ready. If it is not, Helm deploys the old version again, and CloudFormation rolls back the update of the stack to the old template and parameters. Result: the status of the stack is UPDATE_ROLLBACK_COMPLETE. The events of the stack name the failed resource, and the log of the CodeBuild project <ClusterName>-platforma-deployer gives the reason.

Next