Skip to content

Commit

Permalink
Change Jenkins section to CI/CD
Browse files Browse the repository at this point in the history
CI/CD will include Jenkins and other CI/CD systems.

In addition, added a couple of questions on various topics.
  • Loading branch information
abregman committed Oct 31, 2021
1 parent 353ae7f commit 046b154
Show file tree
Hide file tree
Showing 13 changed files with 353 additions and 125 deletions.
369 changes: 248 additions & 121 deletions README.md

Large diffs are not rendered by default.

File renamed without changes.
15 changes: 15 additions & 0 deletions certificates/azure-fundamentals-az-900.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## AZ-900

<details>
<summary>What is cloud computing?</summary><br><b>

[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"
</b></details>

<details>
<summary>What types of clouds (or cloud deployments) are there?</summary><br><b>

* Public - Cloud services sharing computing resources among multiple customers
* Private - Cloud services having computing resources limited to specific customer or organization, managed by third party or organizations itself
* Hybrid - Combination of public and private clouds
</b></details>
1 change: 1 addition & 0 deletions credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Google Cloud Plataform Logo created by <a href="https://about.google/">Google®<
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>.
Certificates logo by <a href="https://www.iconfinder.com/Flatart">Flatart</a><br>
Storage icon by <a href="https://www.iconfinder.com/iconic_hub">Dinosoftlab</a><br>
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.
31 changes: 31 additions & 0 deletions exercises/containers/multi_stage_builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Multi-Stage Builds

### Objective

Learn about multi-stage builds

### Instructions

1. Without actually building an image or running any container, use the following Dockerfile and convert it to use multi-stage:

```
FROM nginx
RUN apt-get update \
&& apt-get install -y curl python build-essential \
&& apt-get install -y nodejs \
&& apt-get clean -y
RUN mkdir -p /my_app
ADD ./config/nginx/docker.conf /etc/nginx/nginx.conf
ADD ./config/nginx/k8s.conf /etc/nginx/nginx.conf.k8s
ADD app/ /my_cool_app
WORKDIR /my_cool_app
RUN npm install -g ember-cli
RUN npm install -g bower
RUN apt-get update && apt-get install -y git \
&& npm install \
&& bower install \
RUN ember build — environment=prod
CMD [ “/root/nginx-app.sh”, “nginx”, “-g”, “daemon off;” ]
```

2. What are the benefits of using multi-stage builds?
58 changes: 58 additions & 0 deletions exercises/containers/solutions/multi_stage_builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## Multi-Stage Builds

### Objective

Learn about multi-stage builds

### Instructions

1. Without actually building an image or running any container, use the following Dockerfile and convert it to use multi-stage:

```
FROM nginx
RUN apt-get update \
&& apt-get install -y curl python build-essential \
&& apt-get install -y nodejs \
&& apt-get clean -y
RUN mkdir -p /my_app
ADD ./config/nginx/docker.conf /etc/nginx/nginx.conf
ADD ./config/nginx/k8s.conf /etc/nginx/nginx.conf.k8s
ADD app/ /my_cool_app
WORKDIR /my_cool_app
RUN npm install -g ember-cli
RUN npm install -g bower
RUN apt-get update && apt-get install -y git \
&& npm install \
&& bower install \
RUN ember build — environment=prod
CMD [ “/root/nginx-app.sh”, “nginx”, “-g”, “daemon off;” ]
```

2. What are the benefits of using multi-stage builds?

### Solution

1. One possible solution (the emphasize is on passing the app from the first stage):

```
FROM node:6
RUN mkdir -p /my_cool_app
RUN npm install -g ember-cli
RUN npm install -g bower
WORKDIR /my_cool_app
RUN npm install
ADD app/ /my_cool_app
RUN bower install
RUN ember build — environment=prod
FROM nginx
RUN mkdir -p /my_cool_app
ADD ./config/nginx/docker.conf /etc/nginx/nginx.conf
ADD ./config/nginx/k8s.conf /etc/nginx/nginx.conf.k8s
# Copy build artifacts from the first stage
COPY — from=0 /my_cool_app/dist /my_cool_app/dist
WORKDIR /my_cool_app
CMD [ “/root/nginx-app.sh”, “nginx”, “-g”, “daemon off;” ]
```

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.
4 changes: 0 additions & 4 deletions exercises/jenkins/jobs_101.md

This file was deleted.

Binary file added images/cicd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 046b154

Please sign in to comment.