├── Caddyfile.local
├── Caddyfile
├── Dockerfile.local
├── Dockerfile
├── presentation
├── images
│ ├── aws-logo.png
│ ├── headshot.png
│ ├── yt-icon.png
│ ├── twitter-icon.png
│ ├── website-icon.png
│ └── website-icon.webp
├── index.html
├── styles.css
└── markdown.md
├── .github
└── workflows
│ └── build-push-deploy.yml
├── Makefile
└── LICENSE
/Caddyfile.local:
--------------------------------------------------------------------------------
1 | http://localhost:80 {
2 | root * /srv
3 | file_server
4 | }
--------------------------------------------------------------------------------
/Caddyfile:
--------------------------------------------------------------------------------
1 | codu.mysuperawesomesite.com {
2 | tls sid.palas@gmail.com
3 | root * /srv
4 | file_server
5 | }
--------------------------------------------------------------------------------
/Dockerfile.local:
--------------------------------------------------------------------------------
1 | FROM caddy:2.1.1
2 | COPY Caddyfile /etc/caddy/Caddyfile
3 | COPY ./presentation /srv
4 | EXPOSE 80
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM caddy:2.1.1
2 | COPY Caddyfile /etc/caddy/Caddyfile
3 | COPY ./presentation /srv
4 | EXPOSE 80
5 | EXPOSE 443
--------------------------------------------------------------------------------
/presentation/images/aws-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sidpalas/intro-to-devops-webinar/HEAD/presentation/images/aws-logo.png
--------------------------------------------------------------------------------
/presentation/images/headshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sidpalas/intro-to-devops-webinar/HEAD/presentation/images/headshot.png
--------------------------------------------------------------------------------
/presentation/images/yt-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sidpalas/intro-to-devops-webinar/HEAD/presentation/images/yt-icon.png
--------------------------------------------------------------------------------
/presentation/images/twitter-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sidpalas/intro-to-devops-webinar/HEAD/presentation/images/twitter-icon.png
--------------------------------------------------------------------------------
/presentation/images/website-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sidpalas/intro-to-devops-webinar/HEAD/presentation/images/website-icon.png
--------------------------------------------------------------------------------
/presentation/images/website-icon.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sidpalas/intro-to-devops-webinar/HEAD/presentation/images/website-icon.webp
--------------------------------------------------------------------------------
/presentation/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Title
5 |
6 |
7 |
8 |
9 |
11 |
16 |
17 |
--------------------------------------------------------------------------------
/presentation/styles.css:
--------------------------------------------------------------------------------
1 | @import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
2 | @import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
3 | @import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
4 |
5 | body {
6 | font-family: 'Droid Serif';
7 | }
8 | h1,
9 | h2,
10 | h3 {
11 | font-family: 'Yanone Kaffeesatz';
12 | font-weight: normal;
13 | }
14 | .remark-code,
15 | .remark-inline-code {
16 | font-family: 'Ubuntu Mono';
17 | }
18 |
--------------------------------------------------------------------------------
/.github/workflows/build-push-deploy.yml:
--------------------------------------------------------------------------------
1 | name: build push deploy presentation site
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | build-push-deploy:
10 | name: Build, Push, Deploy
11 | runs-on: ubuntu-latest
12 |
13 | steps:
14 | - name: install ssh key
15 | uses: shimataro/ssh-key-action@v2
16 | with:
17 | key: ${{ secrets.SSH_KEY }}
18 | known_hosts: ${{ secrets.KNOWN_HOSTS }}
19 |
20 | - name: dockerhub login
21 | uses: docker/login-action@v1.6.0
22 | with:
23 | username: ${{ secrets.DOCKERHUB_USERNAME }}
24 | password: ${{ secrets.DOCKERHUB_TOKEN }}
25 |
26 | - name: checkout
27 | uses: actions/checkout@v2
28 |
29 | - name: build
30 | run: |
31 | make build-production
32 |
33 | - name: push
34 | run: |
35 | make push-production
36 |
37 | - name: deploy
38 | run: |
39 | make run-production
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | build-local:
2 | docker build -t presentation -f Dockerfile.local .
3 |
4 | run-local:
5 | docker run -p 8080:80 presentation
6 |
7 | ###
8 |
9 | GITHUB_SHA?=latest
10 | IMAGE_TAG=sidpalas/codu-intro-to-devops:$(GITHUB_SHA)
11 |
12 | build-production:
13 | docker build -t $(IMAGE_TAG) -f Dockerfile .
14 |
15 | push-production:
16 | docker push $(IMAGE_TAG)
17 |
18 | SSH_STRING:=root@134.122.14.216
19 | CONTAINER_NAME:=presentation-caddy
20 |
21 | ssh:
22 | ssh $(SSH_STRING)
23 |
24 | ssh-cmd:
25 | ssh $(SSH_STRING) '$(CMD)'
26 |
27 | stop-production:
28 | -$(MAKE) ssh-cmd CMD='docker pull $(IMAGE_TAG)'
29 | -$(MAKE) ssh-cmd CMD='docker stop $(CONTAINER_NAME)'
30 | -$(MAKE) ssh-cmd CMD='docker rm $(CONTAINER_NAME)'
31 |
32 | run-production:
33 | -$(MAKE) stop-production
34 | $(MAKE) ssh-cmd CMD=' \
35 | docker run \
36 | --name=$(CONTAINER_NAME) \
37 | --restart=unless-stopped \
38 | -d \
39 | -p 80:80 \
40 | -p 443:443 \
41 | -v /caddy-data:/data \
42 | -v /caddy-config:/config \
43 | $(IMAGE_TAG) \
44 | '
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Sid Palas
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/presentation/markdown.md:
--------------------------------------------------------------------------------
1 | class: center, middle
2 |
3 | # Introduction to DevOps!
4 |
5 | ### Sid Palas -- DevOps Directive
6 |
7 | 
8 |
9 | [](https://devopsdirective.com)
10 | [](https://youtube.com/c/DevOpsDirective)
11 | [](https://twitter.com/sidpalas)
12 |
13 | ---
14 |
15 | class: middle, center
16 |
17 | ###"DevOps is the combination of cultural philosophies, practices,
18 |
19 | ###and tools that increases an organization’s ability to deliver
20 |
21 | ###applications and services at high velocity"
22 |
23 |
24 |
25 | 
26 |
27 | ---
28 |
29 | # Agenda
30 |
31 | - Build and deploy this presentation...
32 |
33 | ---
34 |
35 | # Agenda
36 |
37 | - Build and deploy this presentation...
38 |
39 | - This presentation was created with markdown + remark.js
40 |
41 | ```html
42 |
43 |
44 |
45 | Intro to DevOps
46 |
47 |
48 |
49 |
50 |
52 |
57 |
58 |
59 | ```
60 |
61 | ---
62 |
63 | # Agenda
64 |
65 | - Build and deploy this presentation...
66 |
67 | - This presentation was created with markdown + remark.js
68 |
69 | #### Part 1:
70 | ```md
71 | 1. Start with .md file
72 | 2. Pull in js dependencies
73 | 3. Serve locally
74 | ```
75 |
76 | #### Part 2:
77 | ```md
78 | 1. Dockerize with Caddy
79 | 2. Provision VM on Digital Ocean
80 | 3. Deploy to codu.mysuperawesomesite.com
81 | ```
82 |
83 | #### Part 3 (Time Permitting):
84 | ```md
85 | 1. Set up CI/CD with GitHub Actions
86 | ```
87 |
88 | ---
89 |
90 | class: middle
91 |
92 | ```md
93 | # TODO:
94 |
95 | 1. Get html template
96 | 2. Clean up boilerplate
97 | 3. Serve with python
98 | 4. Create local Dockerfile
99 | 5. Create local Caddyfile
100 | 6. Create Makefile
101 | 7. Build image
102 | 8. Run container
103 |
104 | 9. Provision Digital Ocean VM
105 | 10. Attach Firewall
106 | 11. Add DNS record
107 | 12. Create Docker Hub repo
108 | 13. Create production Dockerfile
109 | 14. Create production Caddyfile
110 | 15. Build production image
111 | 16. Push production image
112 | 17. SSH onto VM
113 | 18. Run container
114 | 19. Upgrade SSL to full
115 |
116 | 20. Create github action
117 | 21. Setup SSH key
118 | 22. Setup Docker Hub
119 | 23. Checkout code
120 | 24. Build and Push
121 | 25. Create deploy make target
122 | 26. Add deploy to workflow
123 | ```
124 | ---
125 |
126 | class: center, middle
127 |
128 | # Questions?
129 |
--------------------------------------------------------------------------------