-
Notifications
You must be signed in to change notification settings - Fork 13
AWS Portal Migrations 2017 09 27
Charlie Martin edited this page Sep 28, 2017
·
3 revisions
We used this opportunity to install chords_control on the AWS instances. In the future, the CloudFormation template will be modified to use chords_control right off the bat.
-
Preparations:
- On AWS, create an ec2 snapshot of the instance volume.
- ssh into the portal, exec into chords_influxdb, and dump the influxdb database to a file. Use the command copied from bin/influxdb/export_influxdb_tsdata_file.sh. Exit chords_influxdb. Use
docker cp ...
to copy the dump file to ~ec2-user/. Then copy this file off of the AWS instance. (This process can be done from the portal configure interface, if the database is small enough). - From the portal website configure page, export the portal configuration.
-
ssh into the portal, and become root. We will be working in /chords.
sudo -i
- Save and display the existing environment.
cp .env .env.save
cat .env
- Fetch chords_control.
curl -O -k https://raw.githubusercontent.com/NCAR/chords/master/chords_control
- Create a new configuration, inserting values from .env where appropriate. (Use
openssl rand -hex 32
to generate a SECRET_KEY_BASE if necessary). Be sure to set the database retention to something reasonable. Choose a numbered version, rather than latest.
python chords_control --config
- Update the portal.
python chords_control --update
- Stop the portal.
service docker-compose-chords stop
- Restart the docker engine (for good measure).
service docker restart
- Start chords. Might get a complaint like
Service "grafana" is using volume "/var/log/grafana" from the previous container.
. In that case, just stop and start the chords service again.
service docker-compose-chords start
- Make sure that all 5 containers are running. Browse to the portal and check all functions.
docker ps
- Check disk space, then remove unneeded images. Prune docker containers and volumes. Check disk space. In normal circumstances, the system should be using about 4.8G.
df -h
docker images
docker rmi <id1> ... <idn>
docker system prune
docker volume prune
df -h
Project Management
- Stakeholders
- Communication
- Use Cases
- Requirements
- Deliverables
- Milestones Associated with a Release
- "Sandbox" Milestones
- Github Workflow
AWS
- AWS Portal Migrations
- Amazon Appliance Workflow
- Overview
- Bringing up a new CHORDS Portal
- Cloud Formation
- EC2 Costing and Memory Constraints
Docker
- Running CHORDS
- Docker on AWS
- Duplicating Docker/Influxdb portals
- Docker on Raspberry Pi
- Docker Details and Tips
- Running CHORDS on Windows 10
Influxdb
Data Formats
Google Maps
Ingest Utilities
Miscellaneous
- Recovery from a full disk
- Github/Dockerhub release scheme
- CHORDS gh-pages and jeykll
- Bootstrap
- CHORDS Portal Web Site
- Dashboard Helper Refactor
- Development Notes
- Heroku
- Meteobridge
- Migrating from mysql to mysql/influxdb portals
- NCAR Wx Stations into CHORDS
- PAWS to CHORDS
- Post Get Query Syntax
- Postgres Testing
- Rails Tips
- Ruby and Rails Resources
- CUAHSI Archive
Historical Archive