Skip to content

Commit 046b154

Browse files
author
abregman
committed
Change Jenkins section to CI/CD
CI/CD will include Jenkins and other CI/CD systems. In addition, added a couple of questions on various topics.
1 parent 353ae7f commit 046b154

13 files changed

+353
-125
lines changed

README.md

Lines changed: 248 additions & 121 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## AZ-900
2+
3+
<details>
4+
<summary>What is cloud computing?</summary><br><b>
5+
6+
[Wikipedia](https://en.wikipedia.org/wiki/Cloud_computing): "Cloud computing is the on-demand availability of computer system resources, especially data storage (cloud storage) and computing power, without direct active management by the user"
7+
</b></details>
8+
9+
<details>
10+
<summary>What types of clouds (or cloud deployments) are there?</summary><br><b>
11+
12+
* Public - Cloud services sharing computing resources among multiple customers
13+
* Private - Cloud services having computing resources limited to specific customer or organization, managed by third party or organizations itself
14+
* Hybrid - Combination of public and private clouds
15+
</b></details>

credits.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Google Cloud Plataform Logo created by <a href="https://about.google/">Google®<
1818
VirtualBox Logo created by <a href="http://www.iconarchive.com/artist/dakirby309.html">dAKirby309</a>, under the <a href="https://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-Noncommercial 4.0 License</a>.
1919
Certificates logo by <a href="https://www.iconfinder.com/Flatart">Flatart</a><br>
2020
Storage icon by <a href="https://www.iconfinder.com/iconic_hub">Dinosoftlab</a><br>
21+
CI/CD icon made made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a></div>
File renamed without changes.
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Multi-Stage Builds
2+
3+
### Objective
4+
5+
Learn about multi-stage builds
6+
7+
### Instructions
8+
9+
1. Without actually building an image or running any container, use the following Dockerfile and convert it to use multi-stage:
10+
11+
```
12+
FROM nginx
13+
RUN apt-get update \
14+
&& apt-get install -y curl python build-essential \
15+
&& apt-get install -y nodejs \
16+
&& apt-get clean -y
17+
RUN mkdir -p /my_app
18+
ADD ./config/nginx/docker.conf /etc/nginx/nginx.conf
19+
ADD ./config/nginx/k8s.conf /etc/nginx/nginx.conf.k8s
20+
ADD app/ /my_cool_app
21+
WORKDIR /my_cool_app
22+
RUN npm install -g ember-cli
23+
RUN npm install -g bower
24+
RUN apt-get update && apt-get install -y git \
25+
&& npm install \
26+
&& bower install \
27+
RUN ember build — environment=prod
28+
CMD [ “/root/nginx-app.sh”, “nginx”, “-g”, “daemon off;” ]
29+
```
30+
31+
2. What are the benefits of using multi-stage builds?
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Multi-Stage Builds
2+
3+
### Objective
4+
5+
Learn about multi-stage builds
6+
7+
### Instructions
8+
9+
1. Without actually building an image or running any container, use the following Dockerfile and convert it to use multi-stage:
10+
11+
```
12+
FROM nginx
13+
RUN apt-get update \
14+
&& apt-get install -y curl python build-essential \
15+
&& apt-get install -y nodejs \
16+
&& apt-get clean -y
17+
RUN mkdir -p /my_app
18+
ADD ./config/nginx/docker.conf /etc/nginx/nginx.conf
19+
ADD ./config/nginx/k8s.conf /etc/nginx/nginx.conf.k8s
20+
ADD app/ /my_cool_app
21+
WORKDIR /my_cool_app
22+
RUN npm install -g ember-cli
23+
RUN npm install -g bower
24+
RUN apt-get update && apt-get install -y git \
25+
&& npm install \
26+
&& bower install \
27+
RUN ember build — environment=prod
28+
CMD [ “/root/nginx-app.sh”, “nginx”, “-g”, “daemon off;” ]
29+
```
30+
31+
2. What are the benefits of using multi-stage builds?
32+
33+
### Solution
34+
35+
1. One possible solution (the emphasize is on passing the app from the first stage):
36+
37+
```
38+
FROM node:6
39+
RUN mkdir -p /my_cool_app
40+
RUN npm install -g ember-cli
41+
RUN npm install -g bower
42+
WORKDIR /my_cool_app
43+
RUN npm install
44+
ADD app/ /my_cool_app
45+
RUN bower install
46+
RUN ember build — environment=prod
47+
48+
FROM nginx
49+
RUN mkdir -p /my_cool_app
50+
ADD ./config/nginx/docker.conf /etc/nginx/nginx.conf
51+
ADD ./config/nginx/k8s.conf /etc/nginx/nginx.conf.k8s
52+
# Copy build artifacts from the first stage
53+
COPY — from=0 /my_cool_app/dist /my_cool_app/dist
54+
WORKDIR /my_cool_app
55+
CMD [ “/root/nginx-app.sh”, “nginx”, “-g”, “daemon off;” ]
56+
```
57+
58+
2. Multi-stages builds allow you to produce smaller container images by splitting the build process into multiple stages as we did above. The app image doesn't contain anything related to the build process except the actual app.

exercises/jenkins/jobs_101.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

images/cicd.png

3.86 KB
Loading

0 commit comments

Comments
 (0)