Skip to content

docs: minor updates #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app-install/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ resource "null_resource" "application-install" {

provisioner "remote-exec" {
inline = [
"apt-get update",
"apt-get install apache2 -y"
]
}
Expand Down
2 changes: 2 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,7 @@

<!-- <script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script> -->
<script src="js/docsify-pagination.min.js"></script>

<script src="js/docsify-copy-code.min.js"></script>
</body>
</html>
9 changes: 9 additions & 0 deletions docs/js/docsify-copy-code.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions docs/part2/20-custom-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -64,16 +64,22 @@ To run the Terraform module in your local environment, follow these steps.
export TF_VAR_ibmcloud_api_key=<your 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
```
38 changes: 12 additions & 26 deletions docs/part2/30-add-apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<The floating point IP address of the jump box> -var=vpc_id=<ID of the workload VPC>
```

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=<your 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=<The floating point IP address of the jump box> -var=vpc_id=<ID of the workload VPC>
```
: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=<The floating point IP address of the jump box> -var=vpc_id=<ID of the workload VPC>
terraform apply -var=region=eu-gb -var=ssh_private_key="$(cat ./lab2-key-tf)" -var=floating_ip_address=<The floating point IP address of the jump box> -var=vpc_id=<ID of the workload VPC>
```
36 changes: 36 additions & 0 deletions docs/prereqs.md
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions docs/sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down