https://github.com/andreapavoni/workshop-from-devops-practices-to-the-cloud-native-stack
Material for the Avanscoperta workshop "From DevOps practices to the Cloud Native stack"
https://github.com/andreapavoni/workshop-from-devops-practices-to-the-cloud-native-stack
Last synced: 6 months ago
JSON representation
Material for the Avanscoperta workshop "From DevOps practices to the Cloud Native stack"
- Host: GitHub
- URL: https://github.com/andreapavoni/workshop-from-devops-practices-to-the-cloud-native-stack
- Owner: andreapavoni
- Created: 2018-12-14T11:34:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-14T09:18:33.000Z (over 7 years ago)
- Last Synced: 2025-02-12T22:19:38.725Z (over 1 year ago)
- Language: HCL
- Size: 18.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Power App Demo on AWS with
# Usage:
- `cd terraform`
- make sure a file called `var.sh` is present here with AWS credentials
- `make init` initializes terraform
- `make plan` checks whether is save to apply the terraform configuration to your cloud infrastructure
- `make apply` applies your terraform configurations to your cloud infrastructure and generates ansible inventory to be used later
- `cd ../ansible`
- `make prepare` installs python on all machines
- `make run` configures all your machines with applications and code
- check out the value for `frontend_loadbalancer_address` variable that is found [here](ansible/hosts.ini)
# Teardown
- `cd terraform`
- comment all content found in `output.tf`
- `make destroy`
# Exercise #1 (Terraform)
- Using terraform create 3 virtual machine on your favorite Cloud Provider using an AutoscalingGroup in a newly created VPC (all the machines can have a Public IP)
- After this is done, please configure a ApplicationLoadBalancer (loadbalancer as service) to expose port 80 and redirest traffic to all machines at port 8080
- Using `output`, provided by Terraform, generate an Ansible Inventory
# Exercice #2 (Ansible)
- Create a simple playbook called `prepare.yml` to install python on all machines
- Create an Ansible role to run on all machines
- Populate the role to:
- install apache2
- install php7.0
- configure the Virtual Host of Apache to expose on port 8080
- create a basic `index.php` to visualize the private IP of the node
# Expected output
Visiting the loadbalancer url we should see a webpage generated with our `index.php` and refreshing the page should give us a different page body based on which node the loadbalancer redirects the request