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.
Open the AWS web console and navigate to EC2. You should see an active RVF instance start up. It will be called something like "RVF_Worker_prod_". Select the instance and click on the Details tab to see the current AMI details.
- Click the Launch Instance button at the top of the page and select the desired AMI.
- Follow the launch wizard instructions. Once the instance is launched, ssh in.
By default the RVF app is not running. Execute the following:
supervisorctl start rvf-api
If rvf-api not already installed on the AMI, install it from the repo. Starting it now means it has time to start while the .zip file is being downloaded from S3.
apt-get update, apt-get install rvf-api
Copy the extension to the machine from s3, e.g:
aws s3 cp s3://uat-ire.published.release.ihtsdo/extensions/SE/SnomedCT_RF2Release_SE1000052_20180531.zip . --region us-east-1
Post the zip file to the rvf web service. The url ends with the release specifics, e.g. se = Sweden, then the release date/version, int for international release.
curl -X POST -F 'file=@SnomedCT_RF2Release_SE1000052_20160531.zip' http://localhost:10000/api/v1/releases/se/20180531
This should cause the rvf to inject the zip and add it into its list of databases. Check this by starting mysql and running show databases;. You should see the new release, which will look something like rvf_se_20180531.
- Run mysql commands to drop and create rvf_master database to clear existing assertions and assertion groups:
drop database rvf_master; create database rvf_master;
Disconnect from mysql and get ready to image the running copy.
- Right click on the current instance and select Image - Create Image. Give the image a meaningful name, e.g. JAVA8_RVF_Worker_20180531. AWS will automatically populate the AMI ID.
- Once the new image is created, terminate the running instance.
- In Ansible, edit the relevant host_vars (e.g. dev-rvf.ihtsdotools.org). Update the values of rvf_autoscaling_imageId:" with the new AMI ID, e.g. "rvf_autoscaling_imageId: ami-0da3d97e". Once updated redeploy
Check any automated/Jenkins jobs e.g. daily builds etc to see if this is used anywhere for validation etc.