diff --git a/clouds/g1-to-g2-migration/README.md b/clouds/g1-to-g2-migration/README.md index 91f1b116f9bb11e930e3486aab0e0441eb6fe5a0..85771c7dc88c6919106b51d6a0c740e68a8d7f86 100644 --- a/clouds/g1-to-g2-migration/README.md +++ b/clouds/g1-to-g2-migration/README.md @@ -1 +1,3 @@ # e-INFRA CZ G1 to G2 cloud migration resources + +You can find here G1 to G2 migration resources in [terraform](./general/terraform/) and shell [commandline](./general/commandline/). \ No newline at end of file diff --git a/clouds/g1-to-g2-migration/general/commandline/README.md b/clouds/g1-to-g2-migration/general/commandline/README.md index 0978b80100c5131c19dcd12d5f0e35d34887a516..93e240e853ef8a9d38dda97c8f0eea7821033197 100644 --- a/clouds/g1-to-g2-migration/general/commandline/README.md +++ b/clouds/g1-to-g2-migration/general/commandline/README.md @@ -26,3 +26,7 @@ How does the basic infrastructure looks like? * public floating ip address  + +## G1 and G2 cloud differences + +Inspect ([g1-prod-brno.sh.inc](./g1-prod-brno.sh.inc), [g2-prod-brno.sh.inc](./g2-prod-brno.sh.inc), [g2-prod-ostrava.sh.inc](./g2-prod-ostrava.sh.inc)) include shell files to see what needs to be changed. \ No newline at end of file diff --git a/clouds/g1-to-g2-migration/general/terraform/README.md b/clouds/g1-to-g2-migration/general/terraform/README.md index a69aac4e7c67d10a3e0b6aa1545256c60462f6ab..4033c06b7e8aaf1493da164c9b0f38cf935d4f3d 100644 --- a/clouds/g1-to-g2-migration/general/terraform/README.md +++ b/clouds/g1-to-g2-migration/general/terraform/README.md @@ -27,30 +27,18 @@ Terraform demonstrates [how to configure VM servers on creation with cloud-init] e-INFRA.CZ OpenStack cloud distinguishes between two project types: personal and group ([more the topic](https://docs.e-infra.cz/compute/openstack/technical-reference/brno-site/get-access/#personal-project)). -Terraform demo code with additional variable file [`personal-projects.tfvars`](./personal-projects.tfvars) shows how to support both project types i.e. how to parametrize infrastructure definition with minimal code duplications. -There is thin terraform wrapper [`terraform.sh`](./terraform.sh) abstracting the fact which project type you are on. It is not necessary to use the [`terraform.sh`](./terraform.sh) wrapper when you keep in mind that additional terraform variables file [`personal-projects.tfvars`](./personal-projects.tfvars) has to be passed at plan step when you are on personal project. +Terraform demo code comes with terraform variable files (for instance [`personal-projects.tfvars`](./personal-projects.tfvars)) which show what has to be tuned for particular cloud and project type. + ## Using the terraform demo 1. Clone the repository. 1. Load you OpenStack application credentials to environment variables `source project_openrc.sh.inc` -1. Override any infrastructure variables in [main.tf](main.tf) file if needed. Full set of variables can be found in [modules/common/variables.tf](modules/common/variables.tf). -1. In the [terraform root directory](/clouds/g2/ostrava/general/terraform) run following commands to initiate and validate environment - * `./terraform.sh validate-tools` - * `./terraform.sh detect-cloud` - * `./terraform.sh detect-project` - * `./terraform.sh init` - * `./terraform.sh validate` -1. In the [same directory](/clouds/g2/ostrava/general/terraform) run commands to deploy cloud infrastructure - * `./terraform.sh plan --out plan` - * `./terraform.sh apply plan` -1. Once you need to change the infrastructure, first modify the infrastructure declaration and repeat above steps to deploy changes. -1. Cloud resources can be deleted with `./terraform.sh destroy`. - -> You may use terraform directly without the [`terraform.sh`](./terraform.sh) wrapper, but then keep in your mind that just for personal project type you should pass additional variable file [`personal-projects.tfvars`](./personal-projects.tfvars) at plan step (i.e. `terraform plan --out personal-project.plan --var-file=personal-projects.tfvars`) - -Detailed terminal transcripts show how to run terraform demo inside personal project ([with](./terraform-2tier_public_bastion_private_vm_farm-personal-project-wrapper.log) / [without the wrapper](./terraform-2tier_public_bastion_private_vm_farm-personal-project-no-wrapper.log)) as well as under group project([with](./terraform-2tier_public_bastion_private_vm_farm-group-project-wrapper.log) / [without the wrapper](./terraform-2tier_public_bastion_private_vm_farm-group-project-no-wrapper.log)). +1. Override any infrastructure variables in [main.tf](main.tf) file if needed. Full set of variables can be found in [modules/common/variables.tf](/clouds/common/general/terraform/modules/common/variables.tf). +1. In the [terraform root directory](/clouds/g2/ostrava/general/terraform) run following command `./terraform-demo.sh <cloud-environment-name>` (for instance `g2-prod-brno`) + +Detailed terminal transcripts can be found in [logs/](./logs/) subdirectory.. ## Access to the VM nodes