clearml-docs/docs/deploying_clearml/upgrade_server_aws_ec2_ami.md

89 lines
3.9 KiB
Markdown
Raw Normal View History

2021-05-13 23:48:51 +00:00
---
title: AWS EC2 AMIs
---
<Collapsible title="Important: Upgrading to v2.x from v1.16.0 or older" type="info">
MongoDB major version was upgraded from `v5.x` to `6.x`. Please note that if your current ClearML Server version is older than
`v1.17` (where MongoDB `v5.x` was first used), you'll need to first upgrade to ClearML Server v1.17.
First upgrade to ClearML Server v1.17 following the procedure below and using [this `docker-compose` file](https://github.com/clearml/clearml-server/blob/2976ce69cc91550a3614996e8a8d8cd799af2efd/upgrade/1_17_to_2_0/docker-compose.yml). Once successfully upgraded,
you can proceed to upgrade to v2.x.
</Collapsible>
2021-05-13 23:48:51 +00:00
2022-05-19 06:59:10 +00:00
The sections below contain the steps to upgrade ClearML Server on the [same AWS instance](#upgrading-on-the-same-aws-instance), and
2021-05-13 23:48:51 +00:00
to upgrade and migrate to a [new AWS instance](#upgrading-and-migrating-to-a-new-aws-instance).
## Upgrading on the Same AWS Instance
2021-05-13 23:48:51 +00:00
2022-05-19 06:59:10 +00:00
This section contains the steps to upgrade ClearML Server on the same AWS instance.
2021-05-13 23:48:51 +00:00
2024-06-23 07:00:06 +00:00
:::warning
2021-05-13 23:48:51 +00:00
Some legacy **Trains Server** AMIs provided an auto-upgrade on restart capability. This functionality is now deprecated.
:::
**To upgrade your ClearML Server AWS AMI:**
2022-05-19 06:59:10 +00:00
1. Shutdown the ClearML Server executing the following command (which assumes the configuration file is in the environment path).
2024-06-30 06:16:11 +00:00
```
docker-compose -f /opt/clearml/docker-compose.yml down
```
2021-05-13 23:48:51 +00:00
If you are upgrading from **Trains Server**, use this command:
2024-06-30 06:16:11 +00:00
```
docker-compose -f /opt/trains/docker-compose.yml down
```
2022-05-19 06:59:10 +00:00
1. [Backing up your data](clearml_server_aws_ec2_ami.md#backing-up-and-restoring-data-and-configuration) is recommended,
and if your configuration folder is not empty, backing up your configuration.
2021-05-13 23:48:51 +00:00
2022-02-13 17:40:04 +00:00
1. If upgrading from ClearML Server version older than 1.2, you need to migrate your data before upgrading your server. See instructions [here](clearml_server_mongo44_migration.md).
2022-02-13 16:54:59 +00:00
If upgrading from Trains Server version 0.15 or older, a data migration is required before continuing this upgrade. See instructions [here](clearml_server_es7_migration.md).
2021-05-13 23:48:51 +00:00
1. If upgrading from **Trains Server** to **ClearML Server**, rename `/opt/trains` to `/opt/clearml`.
1. Download the latest `docker-compose.yml` file. Execute the following command:
2024-06-30 06:16:11 +00:00
```
sudo curl https://raw.githubusercontent.com/allegroai/clearml-server/master/docker/docker-compose.yml -o /opt/clearml/docker-compose.yml
```
2022-05-19 06:59:10 +00:00
1. Startup ClearML Server. This automatically pulls the latest ClearML Server build.
2021-05-13 23:48:51 +00:00
2024-06-30 06:16:11 +00:00
```
docker-compose -f /opt/clearml/docker-compose.yml pull
docker-compose -f docker-compose.yml up -d
```
2021-05-13 23:48:51 +00:00
## Upgrading and Migrating to a New AWS Instance
2021-05-13 23:48:51 +00:00
2022-05-19 06:59:10 +00:00
This section contains the steps to upgrade ClearML Server on the new AWS instance.
2021-05-13 23:48:51 +00:00
**To migrate and to upgrade your ClearML Server AWS AMI:**
2022-05-19 06:59:10 +00:00
1. Shutdown ClearML Server. Executing the following command (which assumes the configuration file is in the environment path).
2021-05-13 23:48:51 +00:00
2024-06-30 06:16:11 +00:00
```
docker-compose down
```
2021-05-13 23:48:51 +00:00
1. On the old AWS instance, [backup your data](clearml_server_aws_ec2_ami.md#backing-up-and-restoring-data-and-configuration)
and, if your configuration folder is not empty, backup your configuration.
1. If upgrading from Trains Server version 0.15 or older, you need to migrate your data before upgrading your server. See instructions [here](clearml_server_es7_migration.md).
1. If upgrading from ClearML Server version 1.1 or older, you need to migrate your data before upgrading your server. See instructions [here](clearml_server_mongo44_migration.md).
2021-05-13 23:48:51 +00:00
1. On the new AWS instance, [restore your data](clearml_server_aws_ec2_ami.md#backing-up-and-restoring-data-and-configuration) and, if the configuration folder is not empty, restore the
configuration.
2022-05-19 06:59:10 +00:00
1. Startup ClearML Server. This automatically pulls the latest ClearML Server build.
2021-05-13 23:48:51 +00:00
2024-06-30 06:16:11 +00:00
```
docker-compose -f docker-compose.yml pull
docker-compose -f docker-compose.yml up -d
```