Skip to content

Developer Scratchpad

Asher Densmore-Lynn edited this page Oct 20, 2017 · 14 revisions
AWS Appliance notes:

Current appliance ami-9ea76be4 (posted 2017-10-09 2005 CDT)
Do all testing in us-east-1 (N. Virginia)

Create:

Generate Ubuntu 16.04 instance, 50 gigs SSD
 - try 10 next time, see if AMI import resizing works in best case
login: ubuntu
run Lightsail install sequence (launch.sh -s 0)
manually lock DB (should make script-fragment for that)
hit OpenEMR:80, confirm lock
clear authorized keys from users ubuntu *and root*

future on-boot script
--
#!/bin/bash
if [ -f /etc/appliance-unlocked ]; then
  exit 0
fi

# password reset
/root/appliance-unlock.sh $(curl http://169.254.169.254/latest/meta-data/instance-id)
# key reset
docker exec -it $(docker ps | grep openemr | cut -f 1 -d " ") rm -rf /etc/ssl/private/*
docker restart singleserver_openemr_1
touch /etc/appliance-unlocked
--

shutdown
export AMI
force image public

Test:

EC2 *in us-east-1, N. Virginia*
Launch Instance
Community AMIs
Public images: <enter AMI here>
Smallest recommended instance size: t2.small
(normal EC2 launch sequence follows, don't forget security group)
shell into instance
sudo /root/appliance-unlock.sh <new-password>
hit OpenEMR:80, confirm new password
verify access to containers per doc
verify backup process functions
verify recovery process functions

Debug:

In EC2 or Lightsail, create a *new* SSH key, one you *won't* mind giving away to a developer so we can get into your instance and try to reproduce issues.
We'll want a copy of /tmp/lightsail-launch.sh .
If you encounter an issue, remember you can stop the instance or snapshot it until a developer can look at it.

Clone this wiki locally