Skip to content

Commit

Permalink
Updates containers lecture (#2)
Browse files Browse the repository at this point in the history
* Update 12-AppDeployment.md

* Update 12-AppDeployment.md

* Update 12-AppDeployment.md

* Update 12-AppDeployment.md

* Update 12-AppDeployment.md

* Update 13-AppPackaging.md

* Update 13-AppPackaging.md

* Update 13-AppPackaging.md

* Update 13-AppPackaging.md

* Update 13-AppPackaging.md

* Update 13-AppPackaging.md

* Update 13-AppPackaging.md

* Fix typo
  • Loading branch information
trispera authored Sep 25, 2023
1 parent 4f4ec40 commit 261cd72
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 3 deletions.
Binary file added img/CAP_Theorem_Venn_Diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/deployment_def.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/deploymentconfig_def.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/helm-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions img/helm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/helm_arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/helmchart.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/replicacontrollers_def.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/replicaset_def.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
93 changes: 91 additions & 2 deletions md/12-AppDeployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,99 @@ class: topicslide

# Deployment of Applications

## by Example
### Deployment and DeploymentConfig objects

]

---

#
.container[
.col[
# Deployment
* Deployment objects involve one or more **replica sets**, which contain a point-in-time record of the state of a deployment as a pod template.
]
.col[
# DeploymentConfig
* DeploymentConfig objects involve one or more **replication controllers**, which preceded replica sets.
]]
.center[
**Use Deployment object unless you need a specific feature or behavior provided by DeploymentConfig objects.**
]

---

# Replica sets
.container[
.col[
- Is a native Kubernetes API object that ensures a specified number of pod replicas are running at any given time.
- It supports **set-based** selector requirements.
(**Set-based** label requirements allow filtering keys according to a set of values)
]
.col[.right[
![:scale 80%, ReplicaSet](../img/replicaset_def.png)
]]]

---

# Replication controllers
.container[
.col[
Similar to a replica set:
- Ensures that a specified number of replicas of a pod are running at all times.
But
- If there are more running pods than desired, it deletes as many as necessary to match the defined amount.
- It only supports equality-based selector requirements.
(**Equality-based** label requirements allow filtering by label keys and values)
A selector is a set of labels assigned to the pods that are managed by the replication controller.
]
.col[.right[
![:scale 80%, ReplicaControllers](../img/replicacontrollers_def.png)
]]]

---

# Deployment
.container[
.col[
- Kubernetes provides a first-class, native API object type in OpenShift Container Platform called Deployment.
- Deployment objects:
- Describe the desired state of a component of an application.
- They create replica sets, which orchestrate pod lifecycles
]
.col[.right[
![:scale 80%, Deployment](../img/deployment_def.png)
]]]

---

# DeploymentConfig
.container[
.col[
Provides:
- A DeploymentConfig object which creates a new Replication Controller and lets it start up pods.
- Triggers that automated deployments (Wehbooks, Code change, Image change ...)
- Versioning of application to allow rollbacks either manually of automatically.
- Manual replication scaling and autoscaling
]
.col[.right[
![:scale 80%, DeploymentConfig](../img/deploymentconfig_def.png)
]]]

---

# So, which one?
.container[
.col[
- Both are supported in Openshift Container Platform
- **DeploymentConfig**...
- Prefer consistency
- Automatic rolling back to the last successfully deployed replica set in case of a failure.
- Support lifecycle hooks.
- Custom strategies.
- **Deployment**...
- Prefer availavility over consistency
- Implicit config change trigger in every change in the pod template or deployment. Can be paused.
]
.col[.right[
![:scale 90%, CAP-Theorem](../img/CAP_Theorem_Venn_Diagram.png)
]]]
85 changes: 84 additions & 1 deletion md/13-AppPackaging.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,87 @@
layout: false
class: topicslide

.topic[

# Packaging Containerized Applications

- Content comming soon (e.g. Helm charts and Templates)
## Helm

]

---

# What is Helm?
Helm is like a package (called **charts**) manager for Kubernetes and helps you manage Kunernetes applications.
Helm charts help you define, install and upgrade Kubernetes application.

.center[
![Helm-logo](../img/helm.svg)]

---

# Helm architecture
.container[
.col[
Three important concepts:
- **chart**: A bundle of information necessary to create an instance of a Kubernetes application.
- **config**: It contains configuration information that can be merged into a packaged chart.
- **release**: A running instance of a chart combined with a specific config.

**Helm** is implemented into two distincts parts:
- Helm Client
- Helm Library
]
.col[.right[
![:scale 80%, Helm](../img/helm_arch.png)]
]]

---

# Helm packages search
Two commands:
- `helm search hub`
- `helm search repo`

.container[
.col[
.center[
### helm search hub
]
This command search charts from repositories on Artifact Hub
]
.col[
.center[
### helm search repo
]
.right[
This command search charts from your Helm configuration.
Type `helm` to find the location of your config file.
]]]
.center[![scale: 70%, Helm-search](../img/helm-search.png)]

---

# Helm packages manager
As easy as package manager from Linux systems:
- `helm repo add`: Add a repository
- `helm repo list`: List your installed repository
- `helm repo update`: Update the index and allows you to benefit from the latest versions of packages.

---

# Helm packages installation
One command: `helm install`
It may require the installation of a repository before:
- `helm repo add ....`
- `helm repo update`
- `helm search repo ....`
- `helm install [NAME] [CHART]`
After your installation, you can list your releases with the command `helm ls` (Use `-A` for all namespaces)

---

# What's next?
Helm allows you to build your own charts, more explication in the exercice [Packaging Containerized Applications](../exercises-containers/12-AppPackaging.html)

.center[![:scale 40%, Helm-exercices](../img/helmchart.jpg)]

0 comments on commit 261cd72

Please sign in to comment.