As a new extension or a new release comes along it will have to be put into the rvf so that it can be validated
- Obtain the latest AMI used in prod. ( You can check the rvf config /etc/opt/rvf-api/execution-service.properties or find out from the running instance as shown below)
- Open the AWS web console. choose EC2 and then set to Ireland e..g.:
- You should see an instance start up . It will be called something like "RVF_Worker_prod_" If you click on it you should see its "AMI ID" for example: RVF_Worker_AMI_20160731_DK_SE_Latest (ami-67d69a14)
- Navigate to IMAGES/AMIS page or use the link below:
- Select the chosen AMI name and launch an instance.
- Edit the Security Groups and Select an existing security group
- Press the launch button and select a relevant key pair
- You should see an instance starting up.
- ssh to this public ip address
- sudo su
- By default RVF app is not running so execute supervisorctl start rvf-api. if rvf-api not already installed on the ami then apt-get update , apt-get install rvf-api.
Starting it now means it has time to start before point 13 i.e. while the zip file is coming down from s3.
- copy the extension to the machine from s3 e.g.
aws s3 cp s3://uat-ire.published.release.ihtsdo/extensions/SE/SnomedCT_RF2Release_SE1000052_20160531.zip . --region eu-west-1
- Then post the zip file to the rvf webservice:
curl -X POST -F 'file=@SnomedCT_RF2Release_SE1000052_20160531.zip' http://localhost:10003/api/v1/releases/se/20160531
Where the url ends with the release specifics (e.g. se = sweden & then the release date/version, int for international release)
- This should cause the rvf to inject the zip and add it into it's list of databases.
- Check this by using mysql & then when in mysql the "show databases;" command
- You should see a new release is added in the mysql db e.g rvf_se_20160531
- Run mysql commands to drop and create rvf_master database to clear existing assertions and assertion groups. Mysql Commands: drop database rvf_master, create database rvf_master
- db diconnect from mysql and get ready to image the running copy
- Choose the instance via the AWS web UI side click on it. chose "image" and then "create image". Give the image a name. it will have an id e.g. "ami-0da3d97e"
- Terminate the instance when new AMI image is created.
- In ansible edit the relevant host_vars (e.g. dev-rvf.ihtsdotools.org) editing "rvf_autoscaling_imageId:" e.g. "rvf_autoscaling_imageId: ami-0da3d97e"
- Else if trying it out....and just want to try manually ssh onto the relevant rvf controller machine (e.g. uat-release), edit "/etc/opt/rvf-api/execution-service.properties" and
set rvf.autoscaling.imageId = ami-0da3d97e .
Then save and then "supervisorctl restart rvf-api"
- Will then need to check any automated/jenkins jobs e.g. daily builds etc to see if this is used anywhere for validation etc.