Skip to content

This repository provides templates and procedures to automate the deployment of cloud applications that researchers might need in the cloud

License

Notifications You must be signed in to change notification settings

CSI-Genomics-and-Data-Analytics-Core/cloud-apps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud applications

In this repository, we will keep code and procedures to deploy cloud applications that researchers might need.

Windows GUI applications

In some instances, users need to analyze data in an graphical user interface (GUI) application. For these cases, the folder win_ec2 contains a cloud formation script to deploy a Windows server 2022 instance, that can be accessed using an RDP client.

Rstudio server

The folder rstudio contains a cloudformation template to create the infrastructure needed to run an Rstudio server. In addition to resource allocation, we have to specify the username and password for the first user to use the server. More users can be added by connecting to the instance via SSH using the private key from the key pair referenced in the cloudformation template.

Notes on getting the latest ami

AMI are usually fixed in the cloud formation templates, and they depend on the region the user is located in. The cloud formation templates used here select the AMI for the user's region, and that AMI es obtained from a map (dictionary) in the teplate file itself. The following commands were used to get Ubuntu and Windows AMIs. At this state, the output needs to be cleaned

Ubuntu

for region in $(aws account list-regions --no-cli-pager | jq '.Regions[].RegionName' | tr -d '"')
do 
    image=$(aws ssm get-parameters --names /aws/service/canonical/ubuntu/server/22.04/stable/current/amd64/hvm/ebs-gp2/ami-id --region $region --no-cli-pager | jq '.Parameters[] | .Value')
    echo "{\"$region\":$image}"
 done

Windows

for region in $(aws account list-regions --no-cli-pager | jq '.Regions[].RegionName' | tr -d '"')
do
    image=$(aws ssm get-parameters-by-path --path "/aws/service/ami-windows-latest" --region $region --no-cli-pager | jq '.Parameters[] | select(.Name | contains("/Windows_Server-2022-English-Full-Base")) | .Value')
    echo "{\"$region\":$image}"; done

About

This repository provides templates and procedures to automate the deployment of cloud applications that researchers might need in the cloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages