Background
If you're running HEAVY.AI via Amazon Machine Image (AMI), the easiest upgrade path is to deploy a new HEAVY.AI AMI and move your data to this environment. Below are instructions for this process.
Upgrading HEAVY.AI via new AMI
Document existing configuration
1. Run docker ps
to determine the names of HEAVY.AI images running on your existing system.
2. Run docker inspect imageName to confirm the container volumes providing data to HeavyDB. In HEAVY.AI v7.0.0+ this is /var/lib/heavyai
unless otherwise configured. In order versions, this host file path location is mapped to /omnisci-storage
within the container. Note the path on the host system that is storing HEAVY.AI data.
3. Check the size of your data directory. Navigate to the directory and run du
-sh .
4. Check the availability zone of your instance in the AWS Console. See illustration below.
Prepare a new EBS Volume
5. Create a new Elastic Block Store (EBS) volume of adequate size (greater than the amount documented in step 3) in the same Availability Zone as your current deployment. See illustration below.
6. Follow follow this guide from AWS to attach an additional EBS volume to your system.
7. Follow the Linux section of this guide from AWS to make the EBS volume available on your current system.
Copy data to new EBS volume
8. Stop HEAVY.AI services on your older AMI (`docker stop $(docker ps -q)`)
9. Copy data from the folder identified in step two over to your new mounted EBS volume. You can do this with `cp` or with `rsync`. If you need specific guidance, you may find system admistration guidance on this topic at this link.
10. Restart services on your existing AMI.
Preparing new AMI
Note: This article assumes that you're using a "Usage" AMI instance. If you're not, you'll need to setup a new EC2 container and run HEAVY.AI in this container, as the "BYOL" (Bring your own License) image is no longer available in current release. In this case, note instructions below and proceed to use this guide.
11. Prepare a new HEAVY.AI Amazon Machine Image (AMI) instance, being sure to select the same subnet as identified in step 3, to ensure it's in the same Availability Zone as your current deployment and EBS transfer volume. See illustration below.
12. Repeat steps 6 and 7 to attach the volume to your new HEAVY.AI instance.
Configuring AMI to use existing data
13. Navigate to /var/lib/heavyai
and run docker-compose down
14. To transfer data to your new environment; you have two options:
A. You can remove existing /var/lib/heavyai
folder on your new system and replace with the data from your attached EBS volume.
B. You can edit your docker-compose.yml file to use the path of your attached EBS volume.
Comments
0 comments
Please sign in to leave a comment.