diff --git a/app-install/main.tf b/app-install/main.tf index 04c314e..e501326 100644 --- a/app-install/main.tf +++ b/app-install/main.tf @@ -26,6 +26,7 @@ resource "null_resource" "application-install" { provisioner "remote-exec" { inline = [ + "apt-get update", "apt-get install apache2 -y" ] } diff --git a/docs/index.html b/docs/index.html index ac0ad42..ec0d16e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -87,5 +87,7 @@ + + diff --git a/docs/js/docsify-copy-code.min.js b/docs/js/docsify-copy-code.min.js new file mode 100644 index 0000000..3e0138b --- /dev/null +++ b/docs/js/docsify-copy-code.min.js @@ -0,0 +1,9 @@ +/*! + * docsify-copy-code + * v3.0.0 + * https://github.com/jperasmus/docsify-copy-code + * (c) 2017-2023 JP Erasmus + * MIT license + */ +!function(){"use strict";function e(o){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(o)}!function(e,o){void 0===o&&(o={});var t=o.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=e:c.appendChild(document.createTextNode(e))}}(".docsify-copy-code-button,.docsify-copy-code-button>span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{background:grey;background:var(--theme-color,grey);border:0;border-radius:0;color:#fff;font-size:1em;opacity:0;outline:0;overflow:visible;padding:.65em .8em;position:absolute;right:0;top:0;z-index:1}.docsify-copy-code-button>span{background:inherit;border-radius:3px;pointer-events:none}.docsify-copy-code-button>.error,.docsify-copy-code-button>.success{font-size:.825em;opacity:0;padding:.5em .65em;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:-100}.docsify-copy-code-button.error>.error,.docsify-copy-code-button.success>.success{opacity:1;right:100%;transform:translate(-25%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}.docsify-copy-code-button>[aria-live]{height:1px;left:-10000px;overflow:hidden;position:absolute;top:auto;width:1px}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(e,o){e.ready((function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")}))}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,t){var n={buttonText:"Copy to clipboard",errorText:"Error",successText:"Copied"};o.doneEach((function(){var o=Array.from(document.querySelectorAll("pre[data-lang]"));t.config.copyCode&&Object.keys(n).forEach((function(o){var c=t.config.copyCode[o];"string"==typeof c?n[o]=c:"object"===e(c)&&Object.keys(c).some((function(e){var t=location.href.indexOf(e)>-1;return n[o]=t?c[e]:n[o],t}))}));var c=['"].join("");o.forEach((function(e){e.insertAdjacentHTML("beforeend",c)}))})),o.mounted((function(){var e=document.querySelector(".content");e&&e.addEventListener("click",(function(e){if(e.target.classList.contains("docsify-copy-code-button")){var o="BUTTON"===e.target.tagName?e.target:e.target.parentNode,t=document.createRange(),c=o.parentNode.querySelector("code"),i=o.querySelector("[aria-live]"),r=window.getSelection();t.selectNode(c),r&&(r.removeAllRanges(),r.addRange(t));try{document.execCommand("copy")&&(o.classList.add("success"),i.innerText=n.successText,setTimeout((function(){o.classList.remove("success"),i.innerText=""}),1e3))}catch(e){console.error("docsify-copy-code: ".concat(e)),o.classList.add("error"),i.innerText=n.errorText,setTimeout((function(){o.classList.remove("error"),i.innerText=""}),1e3)}(r=window.getSelection())&&("function"==typeof r.removeRange?r.removeRange(t):"function"==typeof r.removeAllRanges&&r.removeAllRanges())}}))}))}].concat(window.$docsify.plugins||[])}(); +//# sourceMappingURL=docsify-copy-code.min.js.map diff --git a/docs/part2/20-custom-module.md b/docs/part2/20-custom-module.md index 8b32f70..e998779 100644 --- a/docs/part2/20-custom-module.md +++ b/docs/part2/20-custom-module.md @@ -43,7 +43,7 @@ To run the Terraform module in your local environment, follow these steps. 2. Change to the `custom-slz` folder ```sh - cd infra-to-app-with-slz/custom-slz + cd infra-to-app-with-landing-zone/custom-slz ``` 3. Create a Terraform workspace. Replace `lab` with your own name in the following command. @@ -64,16 +64,22 @@ To run the Terraform module in your local environment, follow these steps. export TF_VAR_ibmcloud_api_key= ``` -6. Generate a plan. The plan lists of resources that are going to be created. +6. Initialize Terraform. ```sh - terraform plan --var=region=eu-gb -var=ssh_key="$(cat ./lab2-key-tf.pub)" -var=prefix=lab-prefix + terraform init ``` -7. (Optional) Apply the changes. +7. Generate a plan. The plan lists of resources that are going to be created. + + ```sh + terraform plan -var=region=eu-gb -var=ssh_key="$(cat ./lab2-key-tf.pub)" -var=prefix=lab-prefix + ``` + +8. (Optional) Apply the changes. This step might take up to 15 minutes to complete. You can skip it if you're short on time. The automation is run through the catalog onboarding in a later step of this lab. ```sh - terraform apply --var=region=eu-gb -var=ssh_key="$(cat ./lab2-key-tf.pub)" -var=prefix=lab-prefix + terraform apply -var=region=eu-gb -var=ssh_key="$(cat ./lab2-key-tf.pub)" -var=prefix=lab-prefix ``` diff --git a/docs/part2/30-add-apache.md b/docs/part2/30-add-apache.md index 117fef6..ea3310b 100644 --- a/docs/part2/30-add-apache.md +++ b/docs/part2/30-add-apache.md @@ -43,46 +43,32 @@ You can find the code for this step in the [app-install](https://github.com/IBM/ } ``` -To run the Terraform module in your local environment, follow these steps. +To run the Terraform module in your local environment, follow these steps. These steps assume you ran the steps in ([Executing the landing zone with a JSON definition](./part2/20-custom-module)). -1. Clone the repository locally with the following Git command, unless you cloned it in the previous step ([Executing the landing zone with a JSON definition](#/./part2/20-custom-module?id=executing-the-landing-zone-with-a-json-definition)): +1. Change to the `app-install` folder ```sh - git clone https://github.com/IBM/infra-to-app-with-landing-zone + cd infra-to-app-with-landing-zone/app-install ``` -2. Change to the `app-install` folder +2. Initialize Terraform. ```sh - cd infra-to-app-with-slz/app-install + terraform init ``` -3. Create a Terraform workspace. Replace `lab` with your own name in the following command. +3. Generate a plan. The plan lists of resources that are going to be created. ```sh - terraform workspace new lab + terraform plan -var=region=eu-gb -var=ssh_private_key="$(cat ../custom-slz/lab2-key-tf)" -var=floating_ip_address= -var=vpc_id= ``` - Note: If you receive the error `Workspace "..." already exists`, issue the command: - - ```sh - terraform workspace select lab - ``` - -4. Export the IBM Cloud API key that the Terraform will use for the execution. For instructions, see [Managing user API keys](https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=ui). - - ```sh - export TF_VAR_ibmcloud_api_key= - ``` - -6. Generate a plan. The plan lists of resources that are going to be created. - - ```sh - terraform plan --var=region=eu-gb -var=ssh_private_key="$(cat ./lab2-key-tf)" -var=floating_ip_address= -var=vpc_id= - ``` + :information_source: **Note**: + - `The floating point IP address of the jump box` value can be retrieved by accessing the [virtual server instances for VPC](https://cloud.ibm.com/vpc-ext/compute/vs) in the console. Please make sure the corresponding region that you provisioned your resources is selected in the dropdown. + - `ID of the workload VPC` value can be retrieved by accessing the workload VPC in the [Virtual private clouds](https://cloud.ibm.com/vpc-ext/network/vpcs) list in the console. Please make sure the corresponding region that you provisioned your resources is selected in the dropdown. -7. (Optional) Apply the changes. +4. (Optional) Apply the changes. ```sh - terraform apply --var=region=eu-gb -var=ssh_private_key="$(cat ./lab2-key-tf)" -var=floating_ip_address= -var=vpc_id= + terraform apply -var=region=eu-gb -var=ssh_private_key="$(cat ./lab2-key-tf)" -var=floating_ip_address= -var=vpc_id= ``` \ No newline at end of file diff --git a/docs/prereqs.md b/docs/prereqs.md new file mode 100644 index 0000000..dca5149 --- /dev/null +++ b/docs/prereqs.md @@ -0,0 +1,36 @@ +# Lab Prerequisites :white_check_mark: + +Make sure that you meet the following prerequisites before you begin the lab. + +- IBM Cloud + - An IBM Cloud Pay-Go or Subscription account + - An IBMid + + :information_source: **Note**: Participants in the TechXchange classroom will be provided with credentials to access an IBM Cloud account during the lab. + - [API key with the following permissions](https://cloud.ibm.com/docs/account?topic=account-userapikey&interface=ui#create_user_key) + + | Service | Resources | Role | + | -------- | ------- | ------- | + | IBM Cloud Projects | Aldministrator | + | Activity Tracker event routing | All | Editor | + | Transit Gateway | All | Editor, Manager | + | Schematics | All | Editor, Manager | + | Key Protect | All | Editor, KeyPurge, Manager | + | Cloud Object Storage | All | Editor, Manager | + | VPC Infrastructure Services | All | Editor, Manager | + | Resource group only | All resource group in the account | Viewer, Editor, Administrator| + + :exclamation: **Important**: Participants in the TechXchange classroom will need to create an API key for their provided credentials. Please save the generated API key for later use. + +- A development computer with the following software. + - [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli) + - Text editor of your choice + - Web browser + - Tools to generate SSH key + - Linux and Mac come with ssh-keygen. + - Windows users can use [PuTTYgen](https://www.ssh.com/academy/ssh/putty/windows/puttygen) + + For more information, see [Generating an external SSH key](https://cloud.ibm.com/docs/vpc?topic=vpc-ssh-keys&interface=ui#generating-ssh-keys). + - Optional: [IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started) + +:information_source: **Note**: Participants in the TechXchange classroom will be provided with a development VM with the prerequisite software installed. \ No newline at end of file diff --git a/docs/sidebar.md b/docs/sidebar.md index e1d0a7d..c61f44b 100644 --- a/docs/sidebar.md +++ b/docs/sidebar.md @@ -3,6 +3,7 @@ - [🌍 VPC Landing Zone](./about/20-vpc-landing-zone.md) - [🏗️ Deployable architectures](./about/30-deployable-arch) - [📚 IBM Cloud projects](./about/40-projects.md) +- [📂 Lab Prerequisites](./prereqs.md) - [📂 Lab 1 - End-to-end deployment](./part1/00-objectives.md) - [🚀 Deploy the landing zone VSI pattern](./part1/10-project.md) - [👤 Operator Access](./part1/20-operator-access.md)