Code to create a development environment for Gen3 in Jetstream2.
Note
This project requires a base image with various software, including Kubernetes and Helm. If you or someone else have not already created this image, please refer to the instructions in the Packer folder.
- Log in to the Exosphere console. This will create a network and security group that you can use in the Terraform deployment. You can also manually create these resources in the OpenStack Horizon console.
- Change into the terraform folder:
cd terraform- Copy the gen3-dev.auto.tfvars.template file to gen3-dev.auto.tfvars and edit the values to match your environment.
cp gen3-dev.auto.tfvars.template gen3-dev.auto.tfvarsImportant
m3.medium is the minimum recommended flavor. If you choose a smaller flavor, you may run out of memory or disk space.
- Initialize Terraform
terraform init- Run terraform plan to see what resources will be created
terraform plan- Run terraform apply to create the resources
terraform apply- Open a terminal and connect to the instance using name provided in the Terraform output:
ssh ubuntu@usefully-proud-iguana.cis123456.projects.jetstream-cloud.orgNote
If you stop or shelve your instance you can resume at this point. Shelving is recommended when you are not actively using the instance because it will stop the billing for the instance in Jetstream.
- Start minikube using the appropriate version of Kubernetes for Gen3
minikube start --kubernetes-version v1.31.11 --memory 24g --cpus 4- Increase the max_map_count for Elasticsearch
sudo sysctl -w vm.max_map_count=262144Note
To make this setting permanent, add the following line to /etc/sysctl.conf: vm.max_map_count=262144 and then run sudo sysctl -p
- Install Gen3 using the instructions in the repo: https://github.com/uc-cdis/gen3-helm
Note
You will need to provide a minimal values.yaml file.
Important
Use the Jetstream hostname for the instance as the hostname for the Gen3 installation, e.g.: gen3-e54ddea68b5424cb.cis123456.projects.jetstream-cloud.org
- Get the URL for the revproxy service
minikube service revproxy-service --url- Edit the Caddy config file to proxy that URL to the Gen3 services, then restart caddy
sudo vi /etc/caddy/CaddyfileSample Caddyfile:
gen3-e54ddea68b5424cb.cis123456.projects.jetstream-cloud.org {
# Another common task is to set up a reverse proxy:
reverse_proxy http://192.168.49.2:32247
}
sudo systemctl restart caddyYou should now be able to access the Gen3 services using the hostname for your VM.