Skip to content
This repository was archived by the owner on Oct 7, 2021. It is now read-only.

Commit e9d6d93

Browse files
authored
Add scaffolding (#56)
* Add scaffolding * add templates * add github action to build arch * rename image * rename * add screenshot * add screenshot
1 parent f6637e2 commit e9d6d93

File tree

17 files changed

+404
-3
lines changed

17 files changed

+404
-3
lines changed

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.git
2+
.gitignore
3+
.editorconfig
4+
5+
# Compiled files
6+
**/.terraform/*
7+
**/.terragrunt-cache/*
8+
*.tfstate
9+
*.tfstate.*
10+
11+
# Module directory
12+
.terraform
13+
**/.idea
14+
**/*.iml
15+
16+
**/.build-harness
17+
**/build-harness

.github/CODEOWNERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Use this file to define individuals or teams that are responsible for code in a repository.
2+
# Read more: <https://help.github.com/articles/about-codeowners/>
3+
#
4+
# Order is important: the last matching pattern takes the most precedence
5+
6+
# These owners will be the default owners for everything
7+
* @cloudposse/engineering @cloudposse/contributors
8+
9+
# Cloud Posse must review any changes to Makefiles
10+
**/Makefile @cloudposse/engineering
11+
**/Makefile.* @cloudposse/engineering
12+
13+
# Cloud Posse must review any changes to GitHub actions
14+
.github/* @cloudposse/engineering

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
Found a bug? Maybe our [Slack Community](https://slack.cloudposse.com) can help.
11+
12+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
13+
14+
## Describe the Bug
15+
A clear and concise description of what the bug is.
16+
17+
## Expected Behavior
18+
A clear and concise description of what you expected to happen.
19+
20+
## Steps to Reproduce
21+
Steps to reproduce the behavior:
22+
1. Go to '...'
23+
2. Run '....'
24+
3. Enter '....'
25+
4. See error
26+
27+
## Screenshots
28+
If applicable, add screenshots or logs to help explain your problem.
29+
30+
## Environment (please complete the following information):
31+
32+
Anything that will help us triage the bug will help. Here are some ideas:
33+
- OS: [e.g. Linux, OSX, WSL, etc]
34+
- Version [e.g. 10.15]
35+
36+
## Additional Context
37+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
blank_issues_enabled: false
2+
3+
contact_links:
4+
5+
- name: Community Slack Team
6+
url: https://cloudposse.com/slack/
7+
about: |-
8+
Please ask and answer questions here.
9+
10+
- name: Office Hours
11+
url: https://cloudposse.com/office-hours/
12+
about: |-
13+
Join us every Wednesday for FREE Office Hours (lunch & learn).
14+
15+
- name: DevOps Accelerator Program
16+
url: https://cloudposse.com/accelerate/
17+
about: |-
18+
Own your infrastructure in record time. We build it. You drive it.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'feature request'
6+
assignees: ''
7+
8+
---
9+
10+
Have a question? Please checkout our [Slack Community](https://slack.cloudposse.com) or visit our [Slack Archive](https://archive.sweetops.com/).
11+
12+
[![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
13+
14+
## Describe the Feature
15+
16+
A clear and concise description of what the bug is.
17+
18+
## Expected Behavior
19+
20+
A clear and concise description of what you expected to happen.
21+
22+
## Use Case
23+
24+
Is your feature request related to a problem/challenge you are trying to solve? Please provide some additional context of why this feature or capability will be valuable.
25+
26+
## Describe Ideal Solution
27+
28+
A clear and concise description of what you want to happen. If you don't know, that's okay.
29+
30+
## Alternatives Considered
31+
32+
Explain what alternative solutions or features you've considered.
33+
34+
## Additional Context
35+
36+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Whitespace-only changes.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## what
2+
* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
3+
* Use bullet points to be concise and to the point.
4+
5+
## why
6+
* Provide the justifications for the changes (e.g. business case).
7+
* Describe why these changes were made (e.g. why do these commits fix the problem?)
8+
* Use bullet points to be concise and to the point.
9+
10+
## references
11+
* Link to any supporting github issues or helpful documentation to add some context (e.g. stackoverflow).
12+
* Use `closes #123`, if this PR closes a GitHub issue `#123`
13+

.github/workflows/build-and-push.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: docker
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
jobs:
10+
update:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v1
15+
- name: docker/build-and-push
16+
uses: docker/build-push-action@v1
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
20+
repository: ${{ github.repository }}
21+
registry: registry-1.docker.io
22+
tag_with_ref: true
23+
tag_with_sha: true

Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
FROM cloudposse/geodesic:0.132.1
2+
3+
# Geodesic message of the Day
4+
ENV MOTD_URL="https://geodesic.sh/motd"
5+
6+
# Some configuration options for Geodesic
7+
ENV AWS_SAML2AWS_ENABLED=true
8+
ENV AWS_VAULT_ENABLED=false
9+
ENV GEODESIC_TERRAFORM_WORKSPACE_PROMPT_ENABLED=true
10+
ENV DIRENV_ENABLED=false
11+
12+
ENV DOCKER_IMAGE="cloudposse/reference-architectures"
13+
ENV DOCKER_TAG="latest"
14+
ENV NAMESPACE="eg"
15+
16+
# Geodesic banner message
17+
ENV BANNER="sweet ops"
18+
19+
# Pin kubectl to version 1.15
20+
RUN apk add kubectl-1.15@cloudposse
21+
22+
# Install terraform
23+
RUN apk add terraform@cloudposse
24+
25+
# Install helmfile
26+
RUN apk add helmfile@cloudposse
27+
28+
# Install saml2aws
29+
# https://github.com/Versent/saml2aws#linux
30+
RUN apk add saml2aws@cloudposse
31+
32+
# Install assume-role
33+
RUN apk add assume-role@cloudposse
34+
35+
# Install variant2 overwriting variant
36+
RUN apk add variant2@cloudposse
37+
38+
# Install the "docker" command to interact with the host's Docker daemon
39+
RUN apk add -u docker-cli
40+
41+
# Limit Makefile searches set up by Geodesic
42+
# Allow a single Makefile to serve all child directories
43+
ENV MAKE_INCLUDES="Makefile.settings ../Makefile.parent Makefile"
44+
45+
COPY rootfs/ /
46+
47+
COPY projects/ /projects/
48+
49+
WORKDIR /projects/

Makefile

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
1-
# Import the cloudposse/build-harness
2-
include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
3-
-include tasks/Makefile.*
1+
export DOCKER_ORG ?= cloudposse
2+
export DOCKER_IMAGE ?= $(DOCKER_ORG)/reference-architectures
3+
export DOCKER_TAG ?= latest
4+
export DOCKER_IMAGE_NAME ?= $(DOCKER_IMAGE):$(DOCKER_TAG)
5+
export APP_NAME ?= geodesic.sh
6+
GEODESIC_INSTALL_PATH ?= /usr/local/bin
7+
export INSTALL_PATH ?= $(GEODESIC_INSTALL_PATH)
8+
export SCRIPT = $(INSTALL_PATH)/$(APP_NAME)
49

510
# The target called when calling `make` with no arguments
611
export DEFAULT_HELP_TARGET = help/short
712

13+
# Import the cloudposse/build-harness
14+
-include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness)
15+
16+
## Initialize build-harness, install deps, build docker container, install wrapper script and run shell
17+
all: init deps build install run
18+
@exit 0
19+
20+
## Install dependencies (if any)
21+
deps:
22+
@exit 0
23+
24+
## Build docker image
25+
build:
26+
@make --no-print-directory docker/build
27+
28+
## Push docker image to registry
29+
push:
30+
docker push $(DOCKER_IMAGE)
31+
32+
## Install wrapper script from geodesic container
33+
install:
34+
@docker run --rm $(DOCKER_IMAGE_NAME) | bash -s $(DOCKER_TAG) || (echo "Try: sudo make install"; exit 1)
35+
36+
## Start the geodesic shell by calling wrapper script
37+
run:
38+
$(SCRIPT)

0 commit comments

Comments
 (0)