Skip to content

Commit

Permalink
Merge branch 'master' into discussions-link-update
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeneliason authored Nov 30, 2021
2 parents 2eabf8b + 4bd7ff2 commit 276f409
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 93 deletions.
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ references:
# Build steps
######################################################################################################################

build_docs: &build_docs
run:
name: build
command: yarn && yarn build

deploy_to_staging: &deploy-to-staging
run:
name: deploy to staging
Expand Down Expand Up @@ -62,6 +67,13 @@ references:
# The build jobs available, all consisting of lists of references to the references section above
#######################################################################################################################
jobs:
validate-build:
<<: *base_container
description: Validate Build
steps:
- checkout
- *build_docs

deploy-to-stage:
<<: *base_container
description: Deploy to Staging
Expand Down Expand Up @@ -89,6 +101,9 @@ workflows:
version: 2
each_commit:
jobs:
- validate-build:
context:
- Gruntwork Platform CI
- deploy-to-stage:
context:
- Gruntwork Platform CI
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,3 @@ $ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
6 changes: 3 additions & 3 deletions docs/intro/zero2hero/a-web-app-using-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ When you're done, destroy `docker-compose` with `Ctrl-C`, and then clean up:
docker-compose down
```

We've provided some helper scripts in the [scripts](scripts/) directory to facilitate the bringing up and down of the stack.
We've provided some helper scripts in the scripts directory to facilitate the bringing up and down of the stack.

Run `scripts/up.sh` to bring everything up, and `scripts/down.sh` to destroy everything. Note that the counter value will persist after bringing the stack down and then back up.
If you want the counter to reset, you can run `scripts/up.sh clean`.

---

[Table of Contents](../README.md)
[Table of Contents](zero-to-hero)

Next Section: [Create an ECR Repository with Terraform](../03_ECR_repo)
Next Section: [Create an ECR Repository with Terraform](create-an-ecr-repository-with-terraform)
22 changes: 10 additions & 12 deletions docs/intro/zero2hero/create-an-ecr-repository-with-terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

## Prerequisites

- [Setup for the Course](../01_setup)
- [Create a Web App via Docker](../02_web_app_via_docker)
- [Setup for the Course](setup-for-courses-in-gruntwork-academy)
- [Create a Web App via Docker](a-web-app-using-docker)

This is using basic [Terraform](https://terraform.io) skills, so you'll either need Terraform installed locally or use the container provided in [Setup for the Course](../01_setup). Make sure you are properly set up for AWS authentication.
This is using basic [Terraform](https://terraform.io) skills, so you'll either need Terraform installed locally or use the container provided in [Setup for the Course](./setup-for-courses-in-gruntwork-academy). Make sure you are properly set up for AWS authentication.

## Create the terrafom code

tag::start-tag-name

### [main.tf](main.tf)
### main.tf

This file is basic setup. We require a minimum version of terraform, pull in the Terraform [AWS Provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs), and then set up a data block so that we can retrieve the AWS Account ID later on.

Expand All @@ -29,7 +29,7 @@ data "aws_caller_identity" "current" {}

tag::end-tag-name

### [variables.tf](variables.tf)
### variables.tf

We'll define just a few variables in this file, so that our code can be changed to suit our needs. We might want to launch resources in a different region or rename our application. Both variables have initial default values.

Expand All @@ -47,9 +47,9 @@ variable "app_name" {
}
```

### [ecr.tf](ecr.tf)
### ecr.tf

Here is where the AWS ECR repositories are actually created. We'll create one for each of our three applications (`web`, `api`, and `db`) from the [previous section](../02_web_app_via_docker).
Here is where the AWS ECR repositories are actually created. We'll create one for each of our three applications (`web`, `api`, and `db`) from the [previous section](./a-web-app-using-docker).

```bash
# AWS ECR Repository Terraform documentation: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ecr_repository
Expand All @@ -67,7 +67,7 @@ resource "aws_ecr_repository" "db" {
}
```

### [outputs.tf](outputs.tf)
### outputs.tf

Finally, we specify some outputs for convenience. We'll output the AWS Account ID, and then URLs for the three repositories and URLs for ease of accessing the AWS ECR console for each of the three repositories.

Expand Down Expand Up @@ -245,7 +245,7 @@ Use the AWS CLI to log in to ECR with docker:
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin ${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com
```
Build the Docker image (note this is referencing the directory in the [previous section](../02_web_app_via_docker)):
Build the Docker image (note this is referencing the directory in the [previous section](a-web-app-using-docker)):
```bash
docker build -t zero2hero_web ../02_web_app_via_docker/src/web
Expand Down Expand Up @@ -281,6 +281,4 @@ docker push ${AWS_ACCOUNT_ID}.dkr.ecr.us-west-2.amazonaws.com/zero2hero_db:lates

---

[Table of Contents](../README.md)

Next Section: [Launch Web App to ECS Fargate](../04_web_app_to_ecs_fargate)
[Table of Contents](zero-to-hero)
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ aws aws-vault aws_completer packer terraform terragrunt
You can run the Zero to Hero Gruntwork Academy course from inside this running container.

---
[Table of Contents](../README.md)
[Table of Contents](zero-to-hero)

Next Section: [A Web App via Docker](../02_web_app_via_docker)
Next Section: [A Web App via Docker](a-web-app-using-docker)
34 changes: 3 additions & 31 deletions docs/intro/zero2hero/zero-to-hero.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,14 @@ We recommend you start with the first section and work your way through the cour

## Table of Contents

1. [Setup for the Course](01_setup)
1. [Setup for the Course](zero-to-hero)

Make sure you're set up with the tools needed to go through the rest of the hands-on examples.

1. [Create a Web App via Docker](02_web_app_via_docker)
1. [Create a Web App via Docker](a-web-app-using-docker)

We craft a simple web application backed by an API and a persistent database. Later on, we deploy these services in the cloud in a few different ways.

1. [Create an ECR Repository with Terraform](03_ECR_repo)
1. [Create an ECR Repository with Terraform](create-an-ecr-repository-with-terraform)

We create a simple Terraform module to provision an [Elastic Container Registry](https://aws.amazon.com/ecr/) for your Docker image, and push your image to that repository.

1. [Launch Web App to ECS Fargate](04_web_app_to_ecs_fargate)

We write a more complex Terraform module that deploys your Docker image using [ECS on Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html).

1. [Make a Web App Production Ready](05_web_app_production_ready)

We discuss features necessary to properly productionize your code and show a production-ready checklist.

1. [Use Gruntwork Modules to Launch your Web App](06_gruntwork_modules_web_app)

We deploy the simple web application using a [Gruntwork module](https://gruntwork.io/infrastructure-as-code-library/).

1. [Use Service Catalog to Launch your Web App](07_service_catalog_web_app)

We deploy the simple web application using the [Gruntwork Service Catalog](https://blog.gruntwork.io/introducing-the-gruntwork-module-service-and-architecture-catalogs-eb3a21b99f70#122a)

1. [Add a Data Store to your Web App](08_data_store)

We add a persistent data store via the [Amazon Relational Database Service (RDS)](https://aws.amazon.com/rds/) to the web application.

1. [Deploy a Web App Production Ready the Gruntwork Way](09_web_app_gruntwork_way)

We discuss how to leverage Gruntwork to complete other production requirements.

1. [Upgrade a module](10_upgrade_a_module_version)

We discuss how to upgrade a Gruntwork module to stay current with features and security.
60 changes: 27 additions & 33 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
const lightCodeTheme = require("prism-react-renderer/themes/github")
const darkCodeTheme = require("prism-react-renderer/themes/dracula")

/** @type {import('@docusaurus/types').Config} */
const config = {
title: "Gruntwork Docs",
tagline: "Dinosaurs are cool",
url: "https://your-docusaurus-test-site.com",
baseUrl: "/",
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",
favicon: "/favicon.ico",
organizationName: "gruntwork-io", // Usually your GitHub org/user name.
projectName: "docs", // Usually your repo name.,

stylesheets: [
'https://fonts.googleapis.com/css?family=Source+Sans+Pro',
],
stylesheets: ["https://fonts.googleapis.com/css?family=Source+Sans+Pro"],

presets: [
[
Expand All @@ -37,9 +33,7 @@ const config = {
],
],

plugins: [
"plugin-image-zoom",
],
plugins: ["plugin-image-zoom"],

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
Expand All @@ -56,13 +50,13 @@ const config = {
type: "doc",
position: "left",
label: "Intro",
docId: "intro/overview/world-class-devops"
docId: "intro/overview/world-class-devops",
},
{
type: "doc",
position: "left",
label: "Guides",
docId: "guides/welcome"
docId: "guides/welcome",
},
{
type: "dropdown",
Expand Down Expand Up @@ -108,21 +102,21 @@ const config = {
items: [
{
label: "About Gruntwork",
href: "https://gruntwork.io"
href: "https://gruntwork.io",
},
{
label: "Blog",
href: "https://blog.gruntwork.io/"
href: "https://blog.gruntwork.io/",
},
{
label: "Newsletter",
href: "https://gruntwork.io/newsletter/"
href: "https://gruntwork.io/newsletter/",
},
{
label: "Gruntwork Store",
href: "https://store.gruntwork.io/"
href: "https://store.gruntwork.io/",
},
]
],
},
{
title: "Community",
Expand All @@ -137,59 +131,59 @@ const config = {
},
{
label: "Twitter",
href: "https://twitter.com/gruntwork_io"
href: "https://twitter.com/gruntwork_io",
},
]
],
},
{
title: "Resources",
items: [
{
label: "Developer Portal",
href: "https://app.gruntwork.io"
href: "https://app.gruntwork.io",
},
{
label: "IaC Library on GitHub",
href: "https://github.com/gruntwork-io"
href: "https://github.com/gruntwork-io",
},
{
label: "DevOps Checklist",
href: "https://gruntwork.io/devops-checklist/"
href: "https://gruntwork.io/devops-checklist/",
},
{
label: "Learning Resources",
href: "https://gruntwork.io/devops-resources/"
href: "https://gruntwork.io/devops-resources/",
},
]
],
},
{
title: "Legal",
items: [
{
label: "Privacy Policy",
href: "https://gruntwork.io/legal/privacy-policy/"
href: "https://gruntwork.io/legal/privacy-policy/",
},
{
label: "Cookie Policy",
href: "https://gruntwork.io/legal/cookie-policy/"
href: "https://gruntwork.io/legal/cookie-policy/",
},
{
label: "Terms of Service",
href: "https://gruntwork.io/terms/"
href: "https://gruntwork.io/terms/",
},
]
],
},
],
copyright: `© 2020 – ${new Date().getFullYear()} Gruntwork, Inc.`,
},
colorMode: {
defaultMode: 'dark',
defaultMode: "dark",
disableSwitch: false,
respectPrefersColorScheme: false,
/* we clear these icons out and use CSS to swap in our own images instead */
switchConfig: {
darkIcon: ' ',
lightIcon: ' ',
darkIcon: " ",
lightIcon: " ",
},
},
prism: {
Expand All @@ -198,6 +192,6 @@ const config = {
},
zoomSelector: ".markdown img",
}),
};
}

module.exports = config;
module.exports = config
Loading

0 comments on commit 276f409

Please sign in to comment.