Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Lab-Terraform
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LSDS
Teaching
Bachelor
Cloud-and-Deployment
Lab-Terraform
Commits
3dfb6fba
Commit
3dfb6fba
authored
2 years ago
by
marcoemi.poleggi
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
6dcb7da2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SwitchEngines/README.md
+22
-5
22 additions, 5 deletions
SwitchEngines/README.md
with
22 additions
and
5 deletions
SwitchEngines/README.md
+
22
−
5
View file @
3dfb6fba
...
@@ -3,6 +3,11 @@
...
@@ -3,6 +3,11 @@
Lab template for a Cloud provisioning/orchestration exercise with Terraform
Lab template for a Cloud provisioning/orchestration exercise with Terraform
(TF) and SwitchEngines (OpenStack).
(TF) and SwitchEngines (OpenStack).
:bulb: OpenStack is an open-source Cloud management platform. Although we use here
the SwitchEngines provider, the instructions should be valid for any other Cloud
provider that employs OpenStack.
## Tasks ##
## Tasks ##
**N.B.**
Some tasks require interacting with your local machine's OS: any
**N.B.**
Some tasks require interacting with your local machine's OS: any
...
@@ -25,7 +30,7 @@ special marks to explain what is (or would be) going on:
...
@@ -25,7 +30,7 @@ special marks to explain what is (or would be) going on:
### Task #1: install Terraform CLI and OpenStack CLI ###
### Task #1: install Terraform CLI and OpenStack CLI ###
**Goal:**
install the Terraform CLI and OpenStack CLI on your local machine.
**Goal:**
install the Terraform CLI and OpenStack CLI on your local machine.
Please, refer to your OS documentation for the proper way to do so
Please, refer to your OS documentation for the proper way to do so
.
1.
[
Terraform
1.
[
Terraform
CLI
](
https://learn.hashicorp.com/tutorials/terraform/install-cli
)
CLI
](
https://learn.hashicorp.com/tutorials/terraform/install-cli
)
...
@@ -35,9 +40,9 @@ Please, refer to your OS documentation for the proper way to do so
...
@@ -35,9 +40,9 @@ Please, refer to your OS documentation for the proper way to do so
version >= 6.0.0. It is recommended to install your original distribution
version >= 6.0.0. It is recommended to install your original distribution
package named like
`python-openstackclient`
.
package named like
`python-openstackclient`
.
1.
:bulb:
**Skip this step if you already have a project assigned in SwitchEngines.**
1.
:bulb:
**Skip this step if you already have a project assigned in SwitchEngines.**
On the OpenStack dashboard, create a new project. The placeholder used in
On the OpenStack
"Horizon"
dashboard, create a new project. The placeholder used in
this exercise is
`<your-project-name>`
with value
`Cloud-MA-IaC`
.
this exercise is
`<your-project-name>`
.
1.
:bulb:
**Skip this step if you already have
configured your SwitchEngines access
credentials.**
1.
:bulb:
**Skip this step if you already have
your project's application
credentials.**
Go to your project page, then create new
[
Application
Go to your project page, then create new
[
Application
Credentials
](
https://engines.switch.ch/horizon/identity/application_credentials/
)
Credentials
](
https://engines.switch.ch/horizon/identity/application_credentials/
)
and save it as
`~/.config/openstack/clouds.yaml`
. With SwitchEngines,
and save it as
`~/.config/openstack/clouds.yaml`
. With SwitchEngines,
...
@@ -58,13 +63,25 @@ Please, refer to your OS documentation for the proper way to do so
...
@@ -58,13 +63,25 @@ Please, refer to your OS documentation for the proper way to do so
If you have just one cloud configured, you can drop the switch
If you have just one cloud configured, you can drop the switch
`--os-cloud=engines`
, else adapt accordingly):
`--os-cloud=engines`
, else adapt accordingly):
```
shell
```
shell
lcl
$
openstack
--os-cloud
=
engines
[
application] credential list
lcl
$
openstack
--os-cloud
=
engines credential list
lcl
$
openstack
--os-cloud
=
engines application credential list
```
```
### Task #2: configure TF for OpenStack ###
### Task #2: configure TF for OpenStack ###
**Goal:**
instruct TF to handle a single OpenStack instance.
**Goal:**
instruct TF to handle a single OpenStack instance.
:bulb: Mind that the SwitchEngines' default _zone_ is "ZH", as it is shown in the top bar of the Horizon dashboard.
Make sure that the same zone is configured in your
`clouds.yaml`
:
```
yaml
clouds
:
engines
:
...
region_name
:
"
ZH"
...
```
Find out the smallest image to use for a Debian server:
Find out the smallest image to use for a Debian server:
```
shell
```
shell
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment