change file locations 2022
This commit is contained in:
parent
9b00ecaa09
commit
c99d4f2e6a
@ -156,7 +156,7 @@ This is also a great resource for samples of docker-compose applications with mu
|
|||||||
|
|
||||||
In the above repository, there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
In the above repository, there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
||||||
|
|
||||||
I have uploaded the files to the [Containers folder](/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
I have uploaded the files to the [Containers folder](2022/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ You can find out more information on the [Docker Provider](https://registry.terr
|
|||||||
|
|
||||||
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker-compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker-compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
||||||
|
|
||||||
To show this and how Terraform can handle a little more complexity, we are going to take the docker-compose file for WordPress and MySQL that we created with docker-compose and we will put this to Terraform. You can find the [docker-wordpress.tf](/Days/IaC/Docker-WordPress/docker-WordPress.tf)
|
To show this and how Terraform can handle a little more complexity, we are going to take the docker-compose file for WordPress and MySQL that we created with docker-compose and we will put this to Terraform. You can find the [docker-wordpress.tf](2022/Days/IaC/Docker-WordPress/docker-WordPress.tf)
|
||||||
|
|
||||||
```
|
```
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -24,7 +24,7 @@ Now we could use `kubectl` as we have shown in previous sections. But there are
|
|||||||
|
|
||||||
### Simple Kubernetes Demo
|
### Simple Kubernetes Demo
|
||||||
|
|
||||||
Much like the demo we created in the last session, we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](/Days/IaC/Kubernetes/Kubernetes.tf)
|
Much like the demo we created in the last session, we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](2022/Days/IaC/Kubernetes/Kubernetes.tf)
|
||||||
|
|
||||||
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, and then we will create a deployment which contains 2 replicas and finally service.
|
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, and then we will create a deployment which contains 2 replicas and finally service.
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ tasks:
|
|||||||
|
|
||||||
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
||||||
|
|
||||||
You can find this file located here ([Vagrantfile](/Days/Configmgmt/Vagrantfile))
|
You can find this file located here ([Vagrantfile](2022/Days/Configmgmt/Vagrantfile))
|
||||||
|
|
||||||
```Vagrant
|
```Vagrant
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
@ -146,7 +146,7 @@ This is also a great resource for samples of docker-compose applications with mu
|
|||||||
|
|
||||||
In the above repository, there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
In the above repository, there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
||||||
|
|
||||||
I have uploaded the files to the [Containers folder](/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
I have uploaded the files to the [Containers folder](2022/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ You can find out more information on the [Docker Provider](https://registry.terr
|
|||||||
|
|
||||||
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker-compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker-compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
||||||
|
|
||||||
To show this and how Terraform can handle a little more complexity, we are going to take the docker-compose file for WordPress and MySQL that we created with docker-compose and we will put this to Terraform. You can find the [docker-wordpress.tf](/Days/IaC/Docker-WordPress/docker-WordPress.tf)
|
To show this and how Terraform can handle a little more complexity, we are going to take the docker-compose file for WordPress and MySQL that we created with docker-compose and we will put this to Terraform. You can find the [docker-wordpress.tf](2022/Days/IaC/Docker-WordPress/docker-WordPress.tf)
|
||||||
|
|
||||||
```
|
```
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -14,7 +14,7 @@ Now we could use `kubectl` as we have shown in previous sections. But there are
|
|||||||
|
|
||||||
### Simple Kubernetes Demo
|
### Simple Kubernetes Demo
|
||||||
|
|
||||||
Much like the demo we created in the last session, we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](/Days/IaC/Kubernetes/Kubernetes.tf)
|
Much like the demo we created in the last session, we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](2022/Days/IaC/Kubernetes/Kubernetes.tf)
|
||||||
|
|
||||||
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, and then we will create a deployment which contains 2 replicas and finally service.
|
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, and then we will create a deployment which contains 2 replicas and finally service.
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ tasks:
|
|||||||
|
|
||||||
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
||||||
|
|
||||||
You can find this file located here ([Vagrantfile](/Days/Configmgmt/Vagrantfile))
|
You can find this file located here ([Vagrantfile](2022/Days/Configmgmt/Vagrantfile))
|
||||||
|
|
||||||
```Vagrant
|
```Vagrant
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
@ -154,7 +154,7 @@ This is also a great resource for samples of docker compose applications with mu
|
|||||||
|
|
||||||
In the above repository there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
In the above repository there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
||||||
|
|
||||||
I have uploaded the files to the [Containers folder](/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
I have uploaded the files to the [Containers folder](2022/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ In this first step we are simply going to create a stateless application within
|
|||||||
|
|
||||||
In the first demo we want to define everything we do with YAML, we could have a whole section on YAML but I am going to skim over this and leave some resources at the end that will cover YAML in more detail.
|
In the first demo we want to define everything we do with YAML, we could have a whole section on YAML but I am going to skim over this and leave some resources at the end that will cover YAML in more detail.
|
||||||
|
|
||||||
We could create the following as one YAML file or we could break this down for each aspect of our application, i.e this could be separate files for namespace, deployment and service creation but in this file below we separate these by using `---` in one file. You can find this file located [here](Days\Kubernetes\nginx-stateless-demo.yaml)
|
We could create the following as one YAML file or we could break this down for each aspect of our application, i.e this could be separate files for namespace, deployment and service creation but in this file below we separate these by using `---` in one file. You can find this file located [here](2022\Days\Kubernetes\nginx-stateless-demo.yaml)
|
||||||
|
|
||||||
```
|
```
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -58,7 +58,7 @@ You can find out more information on the [Docker Provider](https://registry.terr
|
|||||||
|
|
||||||
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
||||||
|
|
||||||
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](2022/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
||||||
|
|
||||||
```
|
```
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -23,7 +23,7 @@ Now we could use `kubectl` as we have showed in previous sections. But there are
|
|||||||
|
|
||||||
### Simple Kubernetes Demo
|
### Simple Kubernetes Demo
|
||||||
|
|
||||||
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](/Days/IaC/Kubernetes/kubernetes.tf)
|
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](2022/Days/IaC/Kubernetes/kubernetes.tf)
|
||||||
|
|
||||||
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ tasks:
|
|||||||
|
|
||||||
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
||||||
|
|
||||||
You can find this file located here ([Vagrantfile](/Days/Configmgmt/Vagrantfile))
|
You can find this file located here ([Vagrantfile](2022/Days/Configmgmt/Vagrantfile))
|
||||||
|
|
||||||
```
|
```
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
@ -154,7 +154,7 @@ This is also a great resource for samples of docker-compose applications with mu
|
|||||||
|
|
||||||
In the above repository, there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
In the above repository, there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
||||||
|
|
||||||
I have uploaded the files to the [Containers folder](/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
I have uploaded the files to the [Containers folder](2022/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ You can find out more information on the [Docker Provider](https://registry.terr
|
|||||||
|
|
||||||
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
||||||
|
|
||||||
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](2022/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
||||||
|
|
||||||
```
|
```
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -23,7 +23,7 @@ Now we could use `kubectl` as we have showed in previous sections. But there are
|
|||||||
|
|
||||||
### Simple Kubernetes Demo
|
### Simple Kubernetes Demo
|
||||||
|
|
||||||
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](/Days/IaC/Kubernetes/kubernetes.tf)
|
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](2022/Days/IaC/Kubernetes/kubernetes.tf)
|
||||||
|
|
||||||
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ tasks:
|
|||||||
|
|
||||||
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
||||||
|
|
||||||
You can find this file located here ([Vagrantfile](/Days/Configmgmt/Vagrantfile))
|
You can find this file located here ([Vagrantfile](2022/Days/Configmgmt/Vagrantfile))
|
||||||
|
|
||||||
```
|
```
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
@ -154,7 +154,7 @@ This is also a great resource for samples of docker compose applications with mu
|
|||||||
|
|
||||||
In the above repository there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
In the above repository there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
||||||
|
|
||||||
I have uploaded the files to the [Containers folder](/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
I have uploaded the files to the [Containers folder](2022/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ In this first step we are simply going to create a stateless application within
|
|||||||
|
|
||||||
In the first demo we want to define everything we do with YAML, we could have a whole section on YAML but I am going to skim over this and leave some resources at the end that will cover YAML in more detail.
|
In the first demo we want to define everything we do with YAML, we could have a whole section on YAML but I am going to skim over this and leave some resources at the end that will cover YAML in more detail.
|
||||||
|
|
||||||
We could create the following as one YAML file or we could break this down for each aspect of our application, i.e this could be separate files for namespace, deployment and service creation but in this file below we separate these by using `---` in one file. You can find this file located [here](Days\Kubernetes\nginx-stateless-demo.yaml)
|
We could create the following as one YAML file or we could break this down for each aspect of our application, i.e this could be separate files for namespace, deployment and service creation but in this file below we separate these by using `---` in one file. You can find this file located [here](2022\Days\Kubernetes\nginx-stateless-demo.yaml)
|
||||||
|
|
||||||
```
|
```
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -58,7 +58,7 @@ You can find out more information on the [Docker Provider](https://registry.terr
|
|||||||
|
|
||||||
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
||||||
|
|
||||||
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](2022/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
||||||
|
|
||||||
```
|
```
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -23,7 +23,7 @@ Now we could use `kubectl` as we have showed in previous sections. But there are
|
|||||||
|
|
||||||
### Simple Kubernetes Demo
|
### Simple Kubernetes Demo
|
||||||
|
|
||||||
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](/Days/IaC/Kubernetes/kubernetes.tf)
|
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](2022/Days/IaC/Kubernetes/kubernetes.tf)
|
||||||
|
|
||||||
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ tasks:
|
|||||||
|
|
||||||
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
||||||
|
|
||||||
You can find this file located here ([Vagrantfile](/Days/Configmgmt/Vagrantfile))
|
You can find this file located here ([Vagrantfile](2022/Days/Configmgmt/Vagrantfile))
|
||||||
|
|
||||||
```
|
```
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
@ -154,7 +154,7 @@ This is also a great resource for samples of docker compose applications with mu
|
|||||||
|
|
||||||
In the above repository there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
In the above repository there is a great example which will deploy an Elasticsearch, Logstash, and Kibana (ELK) in single-node.
|
||||||
|
|
||||||
I have uploaded the files to the [Containers folder](/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
I have uploaded the files to the [Containers folder](2022/Days/Containers/elasticsearch-logstash-kibana/) When you have this folder locally, navigate there and you can simply use `docker-compose up -d`
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ In this first step we are simply going to create a stateless application within
|
|||||||
|
|
||||||
In the first demo we want to define everything we do with YAML, we could have a whole section on YAML but I am going to skim over this and leave some resources at the end that will cover YAML in more detail.
|
In the first demo we want to define everything we do with YAML, we could have a whole section on YAML but I am going to skim over this and leave some resources at the end that will cover YAML in more detail.
|
||||||
|
|
||||||
We could create the following as one YAML file or we could break this down for each aspect of our application, i.e this could be separate files for namespace, deployment and service creation but in this file below we separate these by using `---` in one file. You can find this file located [here](Days\Kubernetes\nginx-stateless-demo.yaml)
|
We could create the following as one YAML file or we could break this down for each aspect of our application, i.e this could be separate files for namespace, deployment and service creation but in this file below we separate these by using `---` in one file. You can find this file located [here](2022\Days\Kubernetes\nginx-stateless-demo.yaml)
|
||||||
|
|
||||||
```
|
```
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -58,7 +58,7 @@ You can find out more information on the [Docker Provider](https://registry.terr
|
|||||||
|
|
||||||
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
The above is a very simple demo of what can be done with Terraform plus Docker and how we can now manage this under the Terraform state. We covered docker compose in the containers section and there is a little crossover in a way between this, infrastructure as code as well as then Kubernetes.
|
||||||
|
|
||||||
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
For the purpose of showing this and how Terraform can handle a little more complexity, we are going to take the docker compose file for wordpress and mysql that we created with docker compose and we will put this to Terraform. You can find the [docker-wordpress.tf](2022/Days/IaC/Docker-Wordpress/docker-wordpress.tf)
|
||||||
|
|
||||||
```
|
```
|
||||||
terraform {
|
terraform {
|
||||||
|
@ -23,7 +23,7 @@ Now we could use `kubectl` as we have showed in previous sections. But there are
|
|||||||
|
|
||||||
### Simple Kubernetes Demo
|
### Simple Kubernetes Demo
|
||||||
|
|
||||||
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](/Days/IaC/Kubernetes/kubernetes.tf)
|
Much like the demo we created in the last session we can now deploy nginx into our Kubernetes cluster, I will be using minikube here again for demo purposes. We create our Kubernetes.tf file and you can find this in the [folder](2022/Days/IaC/Kubernetes/kubernetes.tf)
|
||||||
|
|
||||||
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
In that file we are going to define our Kubernetes provider, we are going to point to our kubeconfig file, create a namespace called nginx, then we will create a deployment which contains 2 replicas and finally a service.
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ tasks:
|
|||||||
|
|
||||||
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
We are going to use Vagrant to set up our node environment, I am going to keep this at a reasonable 4 nodes but you can hopefully see that this could easily be 300 or 3000 and this is the power of Ansible and other configuration management tools to be able to configure your servers.
|
||||||
|
|
||||||
You can find this file located here ([Vagrantfile](/Days/Configmgmt/Vagrantfile))
|
You can find this file located here ([Vagrantfile](2022/Days/Configmgmt/Vagrantfile))
|
||||||
|
|
||||||
```
|
```
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
Loading…
Reference in New Issue
Block a user