Skip to content

Commit 3900087

Browse files
authored
Merge pull request #18 from OS2offdig/12-add-a-description-of-deployment-methods-with-placeholders
12 add a description of deployment methods with placeholders
2 parents 4e668b8 + 4cead35 commit 3900087

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

docs/HOW-TO-DEPLOY.MD

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
layout: default
3+
title: "🚀 How to Deploy"
4+
---
5+
6+
# 🚀 How to Deploy
7+
8+
## Introduction
9+
10+
Welcome to the deployment guide for [OS2-PROJECTNAME]. This document will walk you through the process of deploying pre-built containers, whether you're setting up a development environment or deploying to a production cluster.
11+
12+
## 💻 Development
13+
To set up a containerized development and test environment on a local computer or in a hosted developer enviroment like GitHub codespaces, you can use a simple `docker run` or `podman run` command to pull the containerimage and run the container.
14+
15+
#### Docker example
16+
```shell
17+
docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG}
18+
```
19+
[Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/)
20+
21+
#### Podman example
22+
```shell
23+
podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG}
24+
```
25+
[Official documentation for `podman run`](https://docs.podman.io/en/latest/markdown/podman-run.1.html)
26+
27+
28+
29+
## 🚢 Production
30+
To make deployment of [OS2-PROJECTNAME] simple, fast and standardized, we recommend using the supplied deployment templates in the `https://github.com/{USERNAME}/{REPOSITORY}.git` deployment repository.
31+
32+
### 🖥 Deployment on a single host
33+
For less demanding production environments on a single VM or bare metal host, you can use tools like Ansible, Chef, or Puppet to deploy the containerimage.
34+
35+
### Examples
36+
Below is examples that can be run either manually or automated with your Configuration Managment tool of choice. The examples expects the correct enviroment variables to exist and acces to the repository ressources.
37+
38+
### Ansible
39+
40+
Example using `ssh` and `ansible-pull` that pulls and runs the default `local.yml` ansible playbook from the `https://github.com/{USERNAME}/{REPOSITORY}.git` repository.
41+
42+
```shell
43+
ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git
44+
```
45+
🔗 [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html)
46+
47+
---
48+
49+
### 🌐 Cluster Deployment
50+
51+
For more demanding production environments that require scalability, fault tolerance, enchanced security, observability and high availability it is best practice to deploy [OS2-PROJECTNAME] to a cluster controlled by a container orchestrator with technologies like like [Kubernetes](https://kubernetes.io/), [Nomad](https://www.hashicorp.com/products/nomad) or [OpenShift](https://www.openshift.com/) together with [GitOps](https://opengitops.dev/) tools like [ArgoCD](https://argoproj.github.io/argo-cd/), [Flux](https://fluxcd.io/) or [Fleet](ttps://rancher.com/docs/rancher/v2.x/en/deploy-across-clusters/fleet/
52+
)
53+
54+
The deployment templates provided in the `https://github.com/{USERNAME}/{REPOSITORY}.git` deployment repository are designed for integration into a version-controlled [GitOps](https://opengitops.dev/) workflow. These templates are compatible with your chosen [GitOps](https://opengitops.dev/) tools and the container orchestrator of your choice.
55+
56+
🔗 [What is GitOps?](https://about.gitlab.com/topics/gitops/)   |  
57+
🔗 [An illustrated guide to GitOps](https://www.redhat.com/architect/illustrated-guide-gitops)
58+
59+
60+
## 🔄 GitOps Process
61+
Deploy [OS2-PROJECTNAME] to your cluster in 3 steps:
62+
63+
1. **Initialize and Synchronize**:
64+
- **Clone the Deployment Templates**: Start by cloning the deployment templates from `https://github.com/{USERNAME}/{REPOSITORY}.git`.
65+
- **Create a New Branch**: Establish a new branch for your modifications to preserve the integrity of the main branch.
66+
67+
2. **Customize and Collaborate**:
68+
- **Customize the Templates**: Tailor the templates to fit your environment and requirements.
69+
- **Open a Pull Request (PR)**: Submit a PR for your branch, enabling peer review and collaboration.
70+
71+
3. **Merge and Deploy**:
72+
- **Review and Approve**: Have your team review and approve the PR.
73+
- **Merge and Trigger**: Merge the approved PR into the main branch, which triggers the GitOps tool to synchronize and apply the configurations to your cluster.
74+
75+
## ☁️ Managed GitOps Hosting
76+
If preferred, select a managed GitOps hosting provider that aligns with your project's needs and goals.

0 commit comments

Comments
 (0)