Skip to content

Commit

Permalink
Add READMEs to all sample code folders
Browse files Browse the repository at this point in the history
  • Loading branch information
brikis98 committed May 27, 2024
1 parent 63201e5 commit e8bb80c
Show file tree
Hide file tree
Showing 54 changed files with 520 additions and 470 deletions.
14 changes: 14 additions & 0 deletions ch1/ec2-user-data-script/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EC User Data Script

This folder contains:

* `user-data.sh`: A script that you can copy into the user data of an EC2 instance to get that instance to run a
simple Node.js "Hello, World" server on port 80.

For more information, see Chapter 1, "How to Deploy Your App", of [_Fundamentals of DevOps and Software
Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
14 changes: 14 additions & 0 deletions ch1/sample-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Node.js Sample App for Fly.io

This folder contains:

* `app.js`: A simple Node.js "Hello, World" server that listens on port 8080.
* `fly.toml`: A configuration file you can use to run the Node.js app on Fly.io.

For more information, see Chapter 1, "How to Deploy Your App", of [_Fundamentals of DevOps and Software
Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
17 changes: 17 additions & 0 deletions ch2/ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Ansible EC2 Instance

This folder contains:

* `create_ec2_instance_playbook.yml`: An Ansible playbook to create an EC2 instance.
* `configure_sample_app_playbook.yml`: An Ansible playbook to configure an EC2 instance to run a Node.js "Hello, World"
sample app that listens on port 8080. Under the hood, uses the Ansible roles in the `roles` folder.
* `inventory.aws_ec2.yml`: An Ansible dynamic inventory file to discover EC2 instances, which along with the
`group_vars` folder will allow you to connect to those instances and can configure them.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
14 changes: 14 additions & 0 deletions ch2/bash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EC2 Instance Bash Script

This folder contains:

* `deploy-ec2-instance.sh`: A Bash script that deploys an EC2 instance and configures it to run a Node.js "Hello, World"
app that listens on port 8080.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
14 changes: 14 additions & 0 deletions ch2/packer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Node.js Sample App Packer Template

This folder contains:

* `app.js`: A Node.js "Hello, World" sample app that listens on port 8080.
* `sample-app.pkr.hcl`: A Packer template that can create an AMI that has the Node.js sample app installed.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch2/tofu/ec2-instance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EC2 Instance OpenTofu Module

This folder contains a root OpenTofu module that deploys an EC2 instance which runs a Node.js "Hello, World" sample app
that listens on port 8080.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
13 changes: 13 additions & 0 deletions ch2/tofu/live/sample-app-github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EC2 Instance OpenTofu Module

This folder contains a root OpenTofu module that uses the
[ec2-instance reusable OpenTofu module](../../modules/ec2-instance) directly from a GitHub URL to deploy an EC2
instance which runs a Node.js "Hello, World" sample app that listens on port 8080.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
13 changes: 13 additions & 0 deletions ch2/tofu/live/sample-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EC2 Instance OpenTofu Module

This folder contains a root OpenTofu module that uses the
[ec2-instance reusable OpenTofu module](../../modules/ec2-instance) to deploy an EC2 instance which runs a Node.js
"Hello, World" sample app that listens on port 8080.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch2/tofu/modules/ec2-instance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EC2 Instance OpenTofu Module

This folder contains a reusable OpenTofu module that deploys an EC2 instance which runs a Node.js "Hello, World" sample
app that listens on port 8080.

For more information, see Chapter 2, "How to Manage Your Infrastructure as Code", of [_Fundamentals of DevOps and
Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
21 changes: 21 additions & 0 deletions ch3/ansible/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Ansible Server Orchestration

This folder contains an example of how to do server orchestration with Ansible:

* `create_ec2_instances_playbook.yml`: An Ansible playbook to create multiple EC2 instances. You can use it with
`sample-app-vars.yml` to create EC2 instances for running Node.js sample apps or `nginx-vars.yml` to create an EC2
instance for running Nginx.
* `configure_sample_app_playbook.yml`: An Ansible playbook to configure an EC2 instance to run a Node.js "Hello, World"
sample app that listens on port 8080. Under the hood, uses the Ansible roles in the `roles` folder.
* `configure_nginx_playbook.yml`: An Ansible playbook to configure an EC2 instance to run Nginx as a load balancer
that routes traffic across EC2 instances running the Node.js sample app.
* `inventory.aws_ec2.yml`: An Ansible dynamic inventory file to discover EC2 instances, which along with the
`group_vars` folder will allow you to connect to those instances and can configure them.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
14 changes: 14 additions & 0 deletions ch3/docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dockerized Node.js App

This folder contains:

* `app.js`: A Node.js "Hello, World" app that listens on port 8080.
* `Dockerfile`: Instructions to build a Docker image for the Node.js sample app.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
14 changes: 14 additions & 0 deletions ch3/kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Kubernetes Deployment and Service

This folder contains:

* `sample-app-deployment.yml`: A Kubernetes `Deployment` for deploying a simple app that listens on port 8080.
* `sample-app-service.yml`: A Kubernetes `Service` to act as a load balancer for the apps in the `Deployment`.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
15 changes: 15 additions & 0 deletions ch3/packer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Node.js App Packer Template

This folder contains:

* `app.js`: A Node.js "Hello, World" app that listens on port 8080.
* `app.config.js`: A config file for running the Node.js sample app using PM2 as a process supervisor.
* `sample-app.pkr.hcl`: A Packer template for creating an AMI for the Node.js sample app.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
13 changes: 13 additions & 0 deletions ch3/tofu/live/asg-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# VM Orchestration Module

This folder contains a root OpenTofu module that shows an example of VM orchestration. It uses the
[asg](../../modules/asg) module to deploy an ASG running a Node.js "Hello, World" app, and the [alb](../../modules/alb)
module to deploy an ALB that routes traffic across the ASG.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch3/tofu/live/ecr-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Elastic Container Registry (ECR) Module

This folder contains a root OpenTofu module that uses the [ecr-repo](../../modules/ecr-repo) module to create an ECR
repo.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
13 changes: 13 additions & 0 deletions ch3/tofu/live/eks-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Container Orchestration Module

This folder, along with [ecr-sample](../ecr-sample) and the [kubernetes objects](../../../kubernetes), contain an
example of container orchestration. This folder contains a root OpenTofu module that uses the
[eks-cluster](../../modules/eks-cluster) module to create an EKS cluster with a managed node group.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
13 changes: 13 additions & 0 deletions ch3/tofu/live/lambda-sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Serverless Orchestration Module

This folder contains an example of serverless orchestration. It contains a root OpenTofu module that uses
the [lambda](../../modules/lambda) to deploy a Node.js "Hello, World" app as Lambda function and the
[api-gateway](../../modules/api-gateway) to configure an API Gateway that sends HTTP requests to the Lambda function.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch3/tofu/modules/alb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Application Load Balancer (ALB) Module

This folder contains a reusable OpenTofu module that can deploy an ALB that can route HTTP traffic across and a target
group for an HTTP app.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch3/tofu/modules/api-gateway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# API Gateway Module

This folder contains a reusable OpenTofu module that can deploy an HTTP v2 API Gateway that sends traffic to an AWS
Lambda function.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch3/tofu/modules/asg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Auto Scaling Group Module

This folder contains a reusable OpenTofu module that can deploy an Auto Scaling Group and optionally configure it to use
instance refresh and to register in an ALB target group.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
11 changes: 11 additions & 0 deletions ch3/tofu/modules/ecr-repo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Elastic Container Registry (ECR) Module

This folder contains a reusable OpenTofu module that can create an ECR repo.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
11 changes: 11 additions & 0 deletions ch3/tofu/modules/eks-cluster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Elastic Kubernetes Service (EKS) Module

This folder contains a reusable OpenTofu module that can create an EKS cluster with a managed node group.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
12 changes: 12 additions & 0 deletions ch3/tofu/modules/lambda/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AWS Lambda Module

This folder contains a reusable OpenTofu module that can package up a source folder as a Lambda deployment package
(zip file) and deploy that code as a Lambda function.

For more information, see Chapter 3, "How to Deploy Many Apps: Orchestration, VMs, Containers, and Serverless", of
[_Fundamentals of DevOps and Software Delivery_](https://www.fundamentals-of-devops.com) by Yevgeniy Brikman.

> [!IMPORTANT]
> This repo contains example code for learning and experimenting only, in conjunction with the book and blog post
> series. This code is _not_ designed for direct production usage. If you're looking for code you can use directly in
> production, check out the [Gruntwork Library](https://www.gruntwork.io/products/library).
Loading

0 comments on commit e8bb80c

Please sign in to comment.