From b1fc01d38dd4cb27843c12357336b94086639916 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Thu, 13 Jun 2024 17:39:34 +0200 Subject: [PATCH 01/17] First draft added.. GitOps placeholder still missing --- HOW-TO-DEPLOY.MD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 HOW-TO-DEPLOY.MD diff --git a/HOW-TO-DEPLOY.MD b/HOW-TO-DEPLOY.MD new file mode 100644 index 0000000..c23d596 --- /dev/null +++ b/HOW-TO-DEPLOY.MD @@ -0,0 +1,54 @@ +# How to Deploy + +## Introduction + +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. + +## Prerequisites + +Before proceeding with the deployment, please ensure you have the following prerequisites met: + +- Docker or Podman installed for local container management. +- Access to the [OS2-PROJECTNAME] container images. +- For production deployments: + - Access to the Kubernetes cluster where you will deploy the application. + - **For Helm users**: Helm package manager installed. If you do not have Helm installed, please refer to the official Helm installation guide. + +## πŸ’» Development + +To set up a containerized development and test environment you can use the `docker run` or `podman run` to pull the containerimage and run the container. + +### Docker +```shell +docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} +``` +[Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/) + +### Podman +```shell +podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} +``` +[Official documentation for `podman run`](https://docs.podman.io/en/latest/markdown/podman-run.1.html) + + +## 🚒 Production + +To deploy [OS"-PROJECTNAME] to production use the supplied templates in the deployment-repository here: {DEPLOYMENTREPO-URL} + +### 🌐 Manual push deployment with Helm + +Manual push deployments involve a developer or an operator directly deploying changes to a Kubernetes cluster using tools like the Helm package manager. + +To manually push a deployment to a Kubernetes cluster with the chart from the {DEPLOYMENTREPO-URL}, you can use the `helm install` command. + +Here's a basic example: + +```shell +helm install {RELEASE_NAME} {CHART_PATH} --values {VALUES_FILE} +``` +[Official documentation for `helm install`](https://helm.sh/docs/helm/helm_install/#helm) + +For detailed information on the Helm chart structure and syntax, you can refer to the [Helm Charts documentation](https://helm.sh/docs/topics/charts/). + +### Automatic push deployment with GitOps tools + From f3716380098d07a3f4608ac2cbe1d7529a384681 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Thu, 13 Jun 2024 20:34:59 +0200 Subject: [PATCH 02/17] Added Cluster deployment --- HOW-TO-DEPLOY.MD | 61 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/HOW-TO-DEPLOY.MD b/HOW-TO-DEPLOY.MD index c23d596..641cf29 100644 --- a/HOW-TO-DEPLOY.MD +++ b/HOW-TO-DEPLOY.MD @@ -4,27 +4,22 @@ 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. -## Prerequisites +## πŸ’» Development +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 the `docker run` or `podman run` to pull the containerimage and run the container. -Before proceeding with the deployment, please ensure you have the following prerequisites met: +### Prerequisites - Docker or Podman installed for local container management. - Access to the [OS2-PROJECTNAME] container images. -- For production deployments: - - Access to the Kubernetes cluster where you will deploy the application. - - **For Helm users**: Helm package manager installed. If you do not have Helm installed, please refer to the official Helm installation guide. - -## πŸ’» Development -To set up a containerized development and test environment you can use the `docker run` or `podman run` to pull the containerimage and run the container. -### Docker +### πŸ—³οΈ Docker example ```shell docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} ``` [Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/) -### Podman +### 🐭 Podman example ```shell podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} ``` @@ -33,22 +28,48 @@ podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME} ## 🚒 Production -To deploy [OS"-PROJECTNAME] to production use the supplied templates in the deployment-repository here: {DEPLOYMENTREPO-URL} +### Deployment on a single host +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 container. -### 🌐 Manual push deployment with Helm +### Prerequisites -Manual push deployments involve a developer or an operator directly deploying changes to a Kubernetes cluster using tools like the Helm package manager. +- Ansible installed for server configuration management. +- Access to the [OS2-PROJECTNAME] container images in a registry. +- A user account on the remote host with sufficient privileges to execute Ansible commands. +- SSH keys for passwordless login between your local machine and the remote host. This involves generating an SSH key pair and adding the public key to the `authorized_keys` file on the remote host. +- Properly configured environment variables and volumes for production use. -To manually push a deployment to a Kubernetes cluster with the chart from the {DEPLOYMENTREPO-URL}, you can use the `helm install` command. - -Here's a basic example: +### πŸ…°οΈ Ansible Example +Use the following command to run `ansible-pull` from your local machine on the remote host via SSH: ```shell -helm install {RELEASE_NAME} {CHART_PATH} --values {VALUES_FILE} +ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git \\ + -e 'container_port={CONTAINERPORT}' \ + -e 'host_port={HOSTPORT}' \ + -e 'container_name={CONTAINER_NAME}' \ + -e 'image_name={IMAGE_NAME}' \ + -e 'tag={TAG}'" ``` -[Official documentation for `helm install`](https://helm.sh/docs/helm/helm_install/#helm) -For detailed information on the Helm chart structure and syntax, you can refer to the [Helm Charts documentation](https://helm.sh/docs/topics/charts/). +--- + +### 🌐 Cluster Deployment +For more demanding production environments that require scalability, fault tolerance, observability and high availability container orchestration tools like [Kubernetes](https://kubernetes.io/), [Nomad](https://www.hashicorp.com/products/nomad), [OpenShift](https://www.openshift.com/) is recommended alongside [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/ +) to ensure a streamlined and robust deployment process. + +### πŸ“¦ Kubernetes example with Rancher & Fleet + +### Prerequisites + +- A **Rancher-managed Kubernetes cluster** using **RKE2 (RKE Government)**, designed for security and compliance within the Government sector, with FIPS 140-2 compliance and configurations for passing CIS Kubernetes Benchmarks. +- **Fleet GitOps controller** for automated deployments. +- **Access to the deployment repository** containing the [OS2-PROJECTNAME] Helm chart. + +#### πŸ› οΈ Deployment Steps -### Automatic push deployment with GitOps tools +1. **Rancher Setup**: Configure your RKE2 Kubernetes cluster with Rancher for an intuitive management experience. +2. **Fleet Configuration**: Integrate Fleet in Rancher for GitOps deployments, tracking changes to the [OS2-PROJECTNAME] Helm chart. +3. **Helm Chart**: Ensure the Helm chart is updated in the repository with all configurations. +4. **Deployment Trigger**: Updates to the Helm chart in the Git repository will prompt Fleet to deploy within the Rancher-managed cluster. +This streamlined process utilizes Kubernetes' orchestration, Rancher's management, and Fleet's continuous deployment for a secure, government-focused deployment pipeline. From 445726e63c7ed265786a4d4a29ef85543b76a013 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Thu, 13 Jun 2024 20:37:45 +0200 Subject: [PATCH 03/17] Added a rocket for kicks --- HOW-TO-DEPLOY.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HOW-TO-DEPLOY.MD b/HOW-TO-DEPLOY.MD index 641cf29..4822fd3 100644 --- a/HOW-TO-DEPLOY.MD +++ b/HOW-TO-DEPLOY.MD @@ -1,4 +1,4 @@ -# How to Deploy +# πŸš€ How to Deploy ## Introduction From 500b2e6650eaa88e30428d8fb4f245bbe28e9274 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 19 Jun 2024 09:44:04 +0200 Subject: [PATCH 04/17] Added GitOps process --- HOW-TO-DEPLOY.MD | 74 +++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/HOW-TO-DEPLOY.MD b/HOW-TO-DEPLOY.MD index 4822fd3..5511644 100644 --- a/HOW-TO-DEPLOY.MD +++ b/HOW-TO-DEPLOY.MD @@ -5,71 +5,73 @@ 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. ## πŸ’» Development -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 the `docker run` or `podman run` to pull the containerimage and run the container. +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. -### Prerequisites - -- Docker or Podman installed for local container management. -- Access to the [OS2-PROJECTNAME] container images. - - -### πŸ—³οΈ Docker example +#### Docker example ```shell docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} ``` [Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/) -### 🐭 Podman example +#### Podman example ```shell podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} ``` [Official documentation for `podman run`](https://docs.podman.io/en/latest/markdown/podman-run.1.html) + ## 🚒 Production +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. -### Deployment on a single host -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 container. +### πŸ–₯ Deployment on a single host +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. -### Prerequisites +### Examples +Below is a couple of 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. -- Ansible installed for server configuration management. -- Access to the [OS2-PROJECTNAME] container images in a registry. -- A user account on the remote host with sufficient privileges to execute Ansible commands. -- SSH keys for passwordless login between your local machine and the remote host. This involves generating an SSH key pair and adding the public key to the `authorized_keys` file on the remote host. -- Properly configured environment variables and volumes for production use. +#### Ansible -### πŸ…°οΈ Ansible Example -Use the following command to run `ansible-pull` from your local machine on the remote host via SSH: +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. ```shell -ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git \\ - -e 'container_port={CONTAINERPORT}' \ - -e 'host_port={HOSTPORT}' \ - -e 'container_name={CONTAINER_NAME}' \ - -e 'image_name={IMAGE_NAME}' \ - -e 'tag={TAG}'" +ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git ``` +[Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html) + +#### Chef +Example using `git` and `chef-apply` to pull and run the `recipe.rb` chef recipes ansible playbook from from the `https://github.com/{USERNAME}/{REPOSITORY}.git` repository. + +```shell +git clone https://github.com/{USERNAME}/{REPOSITORY}.git && \ + +chef-apply {REPOSITORY}/path/to/recipe.rb +``` + --- ### 🌐 Cluster Deployment + For more demanding production environments that require scalability, fault tolerance, observability and high availability container orchestration tools like [Kubernetes](https://kubernetes.io/), [Nomad](https://www.hashicorp.com/products/nomad), [OpenShift](https://www.openshift.com/) is recommended alongside [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/ ) to ensure a streamlined and robust deployment process. -### πŸ“¦ Kubernetes example with Rancher & Fleet +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. For more information on GitOps principles and practices, visit the [Open GitOps website](https://opengitops.dev/) -### Prerequisites +## πŸ”„ GitOps Process +Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: -- A **Rancher-managed Kubernetes cluster** using **RKE2 (RKE Government)**, designed for security and compliance within the Government sector, with FIPS 140-2 compliance and configurations for passing CIS Kubernetes Benchmarks. -- **Fleet GitOps controller** for automated deployments. -- **Access to the deployment repository** containing the [OS2-PROJECTNAME] Helm chart. +1. **Initialize and Synchronize**: + - **Clone the Deployment Templates**: Start by cloning the deployment templates from `https://github.com/{USERNAME}/{REPOSITORY}.git`. + - **Create a New Branch**: Establish a new branch for your modifications to preserve the integrity of the main branch. -#### πŸ› οΈ Deployment Steps +2. **Customize and Collaborate**: + - **Customize the Templates**: Tailor the templates to fit your environment and requirements. + - **Open a Pull Request (PR)**: Submit a PR for your branch, enabling peer review and collaboration. -1. **Rancher Setup**: Configure your RKE2 Kubernetes cluster with Rancher for an intuitive management experience. -2. **Fleet Configuration**: Integrate Fleet in Rancher for GitOps deployments, tracking changes to the [OS2-PROJECTNAME] Helm chart. -3. **Helm Chart**: Ensure the Helm chart is updated in the repository with all configurations. -4. **Deployment Trigger**: Updates to the Helm chart in the Git repository will prompt Fleet to deploy within the Rancher-managed cluster. +3. **Merge and Deploy**: + - **Review and Approve**: Have your team review and approve the PR. + - **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. -This streamlined process utilizes Kubernetes' orchestration, Rancher's management, and Fleet's continuous deployment for a secure, government-focused deployment pipeline. +## ☁️ Managed GitOps Hosting +If preferred, select a managed GitOps hosting provider that aligns with your project's needs and goals. \ No newline at end of file From 1cec71b4ca98a89714552c651a90a2c8cf21fe66 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 19 Jun 2024 10:19:52 +0200 Subject: [PATCH 05/17] Removed chef example --- HOW-TO-DEPLOY.MD | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/HOW-TO-DEPLOY.MD b/HOW-TO-DEPLOY.MD index 5511644..0f1ef91 100644 --- a/HOW-TO-DEPLOY.MD +++ b/HOW-TO-DEPLOY.MD @@ -28,35 +28,29 @@ To make deployment of [OS2-PROJECTNAME] simple, fast and standardized, we recomm 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. ### Examples -Below is a couple of 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. +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. -#### Ansible +### Ansible 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. ```shell ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git ``` -[Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html) - -#### Chef -Example using `git` and `chef-apply` to pull and run the `recipe.rb` chef recipes ansible playbook from from the `https://github.com/{USERNAME}/{REPOSITORY}.git` repository. - -```shell -git clone https://github.com/{USERNAME}/{REPOSITORY}.git && \ - -chef-apply {REPOSITORY}/path/to/recipe.rb -``` - +πŸ”— [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html) --- ### 🌐 Cluster Deployment -For more demanding production environments that require scalability, fault tolerance, observability and high availability container orchestration tools like [Kubernetes](https://kubernetes.io/), [Nomad](https://www.hashicorp.com/products/nomad), [OpenShift](https://www.openshift.com/) is recommended alongside [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/ -) to ensure a streamlined and robust deployment process. +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/ +) + +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. + +πŸ”— [What is GitOps?](https://about.gitlab.com/topics/gitops/)   |   +πŸ”— [An illustrated guide to GitOps](https://www.redhat.com/architect/illustrated-guide-gitops) -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. For more information on GitOps principles and practices, visit the [Open GitOps website](https://opengitops.dev/) ## πŸ”„ GitOps Process Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: From 3ec8b79f0dc8b06806c752e310e95f75bccddf97 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:33:36 +0200 Subject: [PATCH 06/17] Moved to docs --- HOW-TO-DEPLOY.MD => docs/HOW-TO-DEPLOY.MD | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename HOW-TO-DEPLOY.MD => docs/HOW-TO-DEPLOY.MD (100%) diff --git a/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD similarity index 100% rename from HOW-TO-DEPLOY.MD rename to docs/HOW-TO-DEPLOY.MD From 4cead352bd3b5660efbd6de3e035df65ebd767a9 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:45:05 +0200 Subject: [PATCH 07/17] Testing Front Matter --- docs/HOW-TO-DEPLOY.MD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD index 0f1ef91..6eea52c 100644 --- a/docs/HOW-TO-DEPLOY.MD +++ b/docs/HOW-TO-DEPLOY.MD @@ -1,3 +1,8 @@ +--- +layout: default +title: "πŸš€ How to Deploy" +--- + # πŸš€ How to Deploy ## Introduction From 0f663ba409a6c2ac34dede4c5824363ada048d26 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 19 Jun 2024 14:37:46 +0200 Subject: [PATCH 08/17] Logo, mermaid support added --- _config.yml | 11 +++++++++-- assets/images/os2.jpeg | Bin 0 -> 6128 bytes 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 assets/images/os2.jpeg diff --git a/_config.yml b/_config.yml index faa6eaa..77ab3f4 100644 --- a/_config.yml +++ b/_config.yml @@ -1,8 +1,15 @@ -title: Just the Docs Template -description: A starter template for a Jeykll site using the Just the Docs theme! +title: OS2 Documentation template +description: A starter template for an OS2 product documentation build using Jeykll and Just the Docs theme! theme: just-the-docs url: https://just-the-docs.github.io aux_links: Template Repository: https://github.com/just-the-docs/just-the-docs-template + +logo: "/assets/images/os2.jpeg" + +mermaid: + # Version of mermaid library + # Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/ + version: "10.9.1" \ No newline at end of file diff --git a/assets/images/os2.jpeg b/assets/images/os2.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..31e4466bf3124ada6b292665720d47ad1ad3acfc GIT binary patch literal 6128 zcmb7|byQSew8v+L?iq3jX^@lw2apCS0qK@bDJkhjLTMzGknWal0qG8;3!oJ?q{R>z?!7>+bux``pK=$0Yz*R!T++00aU6K*RxfoCSyjkU*e61!2gDf`X2M zf{cuUiH3%Xj*W?pjfIJYg@cO^#=(W)Vqt-a!4LvMA|fJeJQ64|Ar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6A9xgZqt!~&IdvEM-QlU} z`kt#kir8mVJ1tMuk(u*zr8I8Z^R4ny_D{N8X(LLD9j}lTyArrf#7;E%MajUQ)+-+Y z9Ea(9S5RC?fe`JYVAd8~iMw08jnwO!c_5j}&-7-D%4armpl)!1X3)@y2&#N_Cclf9 z9geq&D9V#^7UUx;qS6c*JHttdAeZc89y<&$#?fc}YVV!)V zmgrx4=RfBRCquQK`Umc9wXUgX*>-AyR|z_`H=JXUBv#@T;Z#c%PS@G%;L>~D4KJY4QoX5JyFDT_49&$!oJd-@g;O?tV9-$Hg5b! z06DSY8Hy~AL@*^MfF=_ky|j$cx;n8^lq>^zP4*2ll?fWFOoP_fwb?-A6Mn(-&1i|V z9$ya%&3SFXEh4aj_5Qpsm#S2E?o*WE8S_%f-TflYve$v`lgA-97ZaaqH6_ladJtFrj`xuObxq&+Q4saU9;-DclNbp{0+ z-!os8%o}1gm!caBg)hBVpsw=INPk Date: Wed, 31 Jul 2024 13:20:10 +0200 Subject: [PATCH 09/17] Work in progress --- docs/BASIC_DEVELOPMENT_GUIDE.md | 89 +++++++++++++++++++++++++ docs/HOW-TO-DEPLOY.MD | 111 +++++++++++++++++++++++--------- 2 files changed, 168 insertions(+), 32 deletions(-) create mode 100644 docs/BASIC_DEVELOPMENT_GUIDE.md diff --git a/docs/BASIC_DEVELOPMENT_GUIDE.md b/docs/BASIC_DEVELOPMENT_GUIDE.md new file mode 100644 index 0000000..9c3239f --- /dev/null +++ b/docs/BASIC_DEVELOPMENT_GUIDE.md @@ -0,0 +1,89 @@ +# Getting Started +Welcome to the basic development guide for [OS2-PROJECTNAME]. + +This guide will help you set up a controlled, isolated development environment using the projects pre-built containers. +By following these steps, you can develop locally or in a managed service like GitHub Codespaces without worrying about conflicts with other software or system libraries. + +## Application architecture + +```mermaid +flowchart LR + +subgraph Infrastructure +P +O +S +end + +subgraph Application +BE +FE +end + +B(Browser)-->P(Reverse Proxy)-->FE(Frontend) & BE(Backend / API) +FE--> BE -->S[(SQL Database)] +BE & FE-->|metrics|O{{Observability}} + + +``` + +## πŸ’» Development + +### Requirements +To set up a containerized development and test environment on a local computer or in a hosted developer enviroment a container runtime enviroment is needed. + + + + +#### Docker example + +```shell +docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} +``` + +[Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/) + +#### Podman example + +```shell +podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} +``` + +[Official documentation for `podman run`](https://docs.podman.io/en/latest/markdown/podman-run.1.html) + + +Guide: https://docs.docker.com/guides/getting-started/develop-with-containers/ +--- + + +## Development + +To spin up the project, simply install Docker Desktop and then run the following +commands: + +``` +git clone https://github.com/docker/getting-started-todo-app +cd getting-started-todo-app +docker compose up -d +``` + +You'll see several container images get downloaded from Docker Hub and, after a +moment, the application will be up and running! No need to install or configure +anything on your machine! + +Simply open to [http://localhost](http://localhost) to see the app up and running! + +Any changes made to either the backend or frontend should be seen immediately +without needing to rebuild or restart the containers. + +To help with the database, the development stack also includes phpMyAdmin, which +can be access at [http://db.localhost](http://db.localhost) (most browsers will +resolve `*.localhost` correctly, so no hosts file changes should be required). + +### Tearing it down + +When you're done, simply remove the containers by running the following command: + +``` +docker compose down +``` \ No newline at end of file diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD index 6eea52c..e99a6be 100644 --- a/docs/HOW-TO-DEPLOY.MD +++ b/docs/HOW-TO-DEPLOY.MD @@ -5,59 +5,109 @@ title: "πŸš€ How to Deploy" # πŸš€ How to Deploy -## Introduction +This document will walk you through the process of deploying pre-built containers to a production host or cluster. -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. +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. -## πŸ’» Development -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. -#### Docker example -```shell -docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} -``` -[Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/) -#### Podman example -```shell -podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} -``` -[Official documentation for `podman run`](https://docs.podman.io/en/latest/markdown/podman-run.1.html) +## πŸ–₯ Single Host Deployment +The single host deployment strategy provided by [OS2-PROJECTNAME] operates without redundancy. It lacks the capabilities to auto-scale or auto-heal. +> [!CAUTION] Not Recommended for Production Use +> ###### This strategy is a cost-effective solution for short-term, limited use systems such as simple Proof of Concepts (PoC) or test systems. While this option allows for a reduction in initial investment, it introduces a single point of failure in the deployment. This deployment strategy is NOT recommended in production systems unless a comprehensive risk assessment process has been conducted and the associated risks have been accepted. -## 🚒 Production -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. -### πŸ–₯ Deployment on a single host -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. +### ⬛ Manual deployment +The following steps provide a general guide for manual running a container using + a runtime that complies with [the OCI standard for container runtimes](https://opencontainers.org/). While the examples use [podman](https://podman.io), you can replace it with any [OCI](https://opencontainers.org/)-compliant runtime tool that fits your specific needs and system configuration. + +1. **Download the Container Image.** + + Use the `pull` command to download the container image from the registry. Add a tag if needed. + + ```r + $ podman pull : + ``` + +2. **Start the Container** + + Use the run command to start the container. + + ```r + $ podman run :. + ``` -### Examples -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. +3. **Verify Status** -### Ansible + Check if the container is running using the `ps` command. + ```r + $ podman ps + ``` -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. +4. **Stop and Remove** + + To stop the container, use `stop` and `rm` to remove it. + ```r + $ podman stop + + $ podman rm + ``` + + :books: [Official podman documentation](https://podman.io/docs) + +### πŸ…°οΈ Managed deployment +You can write deployments to execute the above steps with your preferred deployment tool, whether it is ansible, chef, puppet, salt. The below example uses `ssh` and `ansible-pull` to pull and run the a default `local.yml` ansible playbook from a deployment repository. + +```yaml +- hosts: servers + vars: + image_name: 'your_image_name_here' + tasks: + - name: Pull an image + containers.podman.podman_image: + name: "{{ image_name }}" + + - name: Run the container + containers.podman.podman_container: + name: my_container + image: "{{ image_name }}" + state: started + + - name: Verify the container is running + command: "podman ps -a | grep my_container" + register: result + + - name: Fail if container is not running + fail: + msg: "Container is not running" + when: "'my_container' not in result.stdout" + +``` + +Store the playbook in a dedicated git repository for your deployment and execute it with `ansible-pull` ```shell -ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git +$ ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git ``` -πŸ”— [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html) + :books: [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html) ---- + :books: [Ansible community documentation - containers.podman](https://docs.ansible.com/ansible/latest/collections/containers/podman/index.html) -### 🌐 Cluster Deployment -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/ +## 🚒 Cluster Deployment + +For 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 [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/ ) -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. +The deployment templates provided in the `https://github.com/{USERNAME}/{REPOSITORY}.git` deployment repository are designed for integration into a version-controlled GitOps workflow. These templates are compatible with your chosen GitOps tools and the container orchestrator of your choice. πŸ”— [What is GitOps?](https://about.gitlab.com/topics/gitops/)   |   πŸ”— [An illustrated guide to GitOps](https://www.redhat.com/architect/illustrated-guide-gitops) -## πŸ”„ GitOps Process +## πŸ”„ Recommended deployment process Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: 1. **Initialize and Synchronize**: @@ -71,6 +121,3 @@ Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: 3. **Merge and Deploy**: - **Review and Approve**: Have your team review and approve the PR. - **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. - -## ☁️ Managed GitOps Hosting -If preferred, select a managed GitOps hosting provider that aligns with your project's needs and goals. \ No newline at end of file From 3957bf1c6e744182ca2dc7a0afac246713214253 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:52:08 +0200 Subject: [PATCH 10/17] Note added --- docs/HOW-TO-DEPLOY.MD | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD index e99a6be..b2afda8 100644 --- a/docs/HOW-TO-DEPLOY.MD +++ b/docs/HOW-TO-DEPLOY.MD @@ -5,22 +5,23 @@ title: "πŸš€ How to Deploy" # πŸš€ How to Deploy -This document will walk you through the process of deploying pre-built containers to a production host or cluster. - -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. +This document will walk you through the process of deploying pre-built containers to a single host or a cluster. +> [!NOTE] Deployment templates +> ###### 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. +   ## πŸ–₯ Single Host Deployment -The single host deployment strategy provided by [OS2-PROJECTNAME] operates without redundancy. It lacks the capabilities to auto-scale or auto-heal. +The single host deployment strategy provided by [OS2-PROJECTNAME] operates without redundancy. It lacks the capabilities to auto-scale or auto-heal and it is not suited for more complex multi-container applications. > [!CAUTION] Not Recommended for Production Use -> ###### This strategy is a cost-effective solution for short-term, limited use systems such as simple Proof of Concepts (PoC) or test systems. While this option allows for a reduction in initial investment, it introduces a single point of failure in the deployment. This deployment strategy is NOT recommended in production systems unless a comprehensive risk assessment process has been conducted and the associated risks have been accepted. +> ###### This strategy is a cost-effective solution for short-term, limited use systems such as simple Proof of Concepts (PoC) or test systems. While this option allows for a reduction in initial investment, it introduces a single point of failure in the deployment. This deployment strategy is NOT recommended in production systems unless a comprehensive risk assessment process has been conducted and the associated risks have been documented and accepted. ### ⬛ Manual deployment -The following steps provide a general guide for manual running a container using +The following steps provide a general guide for manual running a single container application using a runtime that complies with [the OCI standard for container runtimes](https://opencontainers.org/). While the examples use [podman](https://podman.io), you can replace it with any [OCI](https://opencontainers.org/)-compliant runtime tool that fits your specific needs and system configuration. 1. **Download the Container Image.** @@ -60,6 +61,10 @@ The following steps provide a general guide for manual running a container using ### πŸ…°οΈ Managed deployment You can write deployments to execute the above steps with your preferred deployment tool, whether it is ansible, chef, puppet, salt. The below example uses `ssh` and `ansible-pull` to pull and run the a default `local.yml` ansible playbook from a deployment repository. +###### Ansible playbook example: + +`local.yml` + ```yaml - hosts: servers vars: @@ -83,31 +88,30 @@ You can write deployments to execute the above steps with your preferred deploym fail: msg: "Container is not running" when: "'my_container' not in result.stdout" - ``` + + Store the playbook in a dedicated git repository for your deployment and execute it with `ansible-pull` -```shell +```r $ ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git ``` - :books: [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html) - + :books: [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html)   |   :books: [Ansible community documentation - containers.podman](https://docs.ansible.com/ansible/latest/collections/containers/podman/index.html) +   ## 🚒 Cluster Deployment For 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 [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/ -) - -The deployment templates provided in the `https://github.com/{USERNAME}/{REPOSITORY}.git` deployment repository are designed for integration into a version-controlled GitOps workflow. These templates are compatible with your chosen GitOps tools and the container orchestrator of your choice. +) -πŸ”— [What is GitOps?](https://about.gitlab.com/topics/gitops/)   |   -πŸ”— [An illustrated guide to GitOps](https://www.redhat.com/architect/illustrated-guide-gitops) +:books: [What is GitOps?](https://about.gitlab.com/topics/gitops/)   |   +:books: [An illustrated guide to GitOps](https://www.redhat.com/architect/illustrated-guide-gitops) -## πŸ”„ Recommended deployment process +### ♾️ GitOps deployment process Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: 1. **Initialize and Synchronize**: From bc026901cb0258422af505adadefb574caa10984 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:58:29 +0200 Subject: [PATCH 11/17] links to cm tools --- docs/HOW-TO-DEPLOY.MD | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD index b2afda8..fd57374 100644 --- a/docs/HOW-TO-DEPLOY.MD +++ b/docs/HOW-TO-DEPLOY.MD @@ -59,7 +59,10 @@ The following steps provide a general guide for manual running a single containe :books: [Official podman documentation](https://podman.io/docs) ### πŸ…°οΈ Managed deployment -You can write deployments to execute the above steps with your preferred deployment tool, whether it is ansible, chef, puppet, salt. The below example uses `ssh` and `ansible-pull` to pull and run the a default `local.yml` ansible playbook from a deployment repository. +You can write deployments to execute the above steps with your preferred deployment tool, whether it is +[Ansible](https://www.ansible.com/), [Chef](https://www.chef.io/), [Puppet](https://puppet.com/) or [Salt](https://saltproject.io/). + +The below example uses `ssh` and `ansible-pull` to pull and run a default `local.yml` ansible playbook from a deployment repository. ###### Ansible playbook example: From 8d43cfe4ad99574b4c8cf4b4d03d6ca968ae421c Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 31 Jul 2024 14:23:08 +0200 Subject: [PATCH 12/17] dev setup changes --- docs/BASIC_DEVELOPMENT_GUIDE.md | 31 +++++-------------------------- docs/HOW-TO-DEPLOY.MD | 17 +++++++++++++++++ 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/docs/BASIC_DEVELOPMENT_GUIDE.md b/docs/BASIC_DEVELOPMENT_GUIDE.md index 9c3239f..b134414 100644 --- a/docs/BASIC_DEVELOPMENT_GUIDE.md +++ b/docs/BASIC_DEVELOPMENT_GUIDE.md @@ -32,39 +32,18 @@ BE & FE-->|metrics|O{{Observability}} ### Requirements To set up a containerized development and test environment on a local computer or in a hosted developer enviroment a container runtime enviroment is needed. - - - -#### Docker example - -```shell -docker run -d -p {CONTAINERPORT:HOSTPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} -``` - -[Official documentation for `docker run`](https://docs.docker.com/reference/cli/docker/container/run/) - -#### Podman example - -```shell -podman run -d -p {HOSTPORT}:{CONTAINERPORT} --name {CONTAINER_NAME} {IMAGE_NAME}:{TAG} -``` - -[Official documentation for `podman run`](https://docs.podman.io/en/latest/markdown/podman-run.1.html) - - -Guide: https://docs.docker.com/guides/getting-started/develop-with-containers/ --- ## Development -To spin up the project, simply install Docker Desktop and then run the following +To spin up the project, simply install docker-compose and then run the following commands: ``` -git clone https://github.com/docker/getting-started-todo-app -cd getting-started-todo-app -docker compose up -d +$ git clone https://github.com/docker/getting-started-app +$ cd getting-started-app +$ docker compose up -d ``` You'll see several container images get downloaded from Docker Hub and, after a @@ -85,5 +64,5 @@ resolve `*.localhost` correctly, so no hosts file changes should be required). When you're done, simply remove the containers by running the following command: ``` -docker compose down +$ docker compose down ``` \ No newline at end of file diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD index fd57374..53ae61d 100644 --- a/docs/HOW-TO-DEPLOY.MD +++ b/docs/HOW-TO-DEPLOY.MD @@ -128,3 +128,20 @@ Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: 3. **Merge and Deploy**: - **Review and Approve**: Have your team review and approve the PR. - **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. + +### :gear: Operations + +#### Updating the Application +Explain how to update the application. With GitOps, this is typically done by making a change to the manifests in the Git repository. + +#### Rollbacks +Discuss how to rollback to a previous version of the application. With GitOps, this can be done by reverting the commit in the Git repository. + +#### Monitoring and Logging +Explain how to monitor the health of the application and how to access the logs. Consider integrating with a centralized logging system. + +#### Security +Discuss any security considerations such as network policies, RBAC, and secret management. + +#### Troubleshooting +Provide common troubleshooting steps and known issues. \ No newline at end of file From 943ae99296f5d9c82874b6d3fc4b5325cb91a521 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:06:15 +0200 Subject: [PATCH 13/17] Added an Auth node and some styling --- docs/BASIC_DEVELOPMENT_GUIDE.md | 34 ++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/docs/BASIC_DEVELOPMENT_GUIDE.md b/docs/BASIC_DEVELOPMENT_GUIDE.md index b134414..8b1d050 100644 --- a/docs/BASIC_DEVELOPMENT_GUIDE.md +++ b/docs/BASIC_DEVELOPMENT_GUIDE.md @@ -8,21 +8,25 @@ By following these steps, you can develop locally or in a managed service like G ```mermaid flowchart LR - -subgraph Infrastructure -P -O -S -end - -subgraph Application -BE -FE -end - -B(Browser)-->P(Reverse Proxy)-->FE(Frontend) & BE(Backend / API) -FE--> BE -->S[(SQL Database)] -BE & FE-->|metrics|O{{Observability}} + subgraph Infrastructure["Infrastructure"] + P("Reverse Proxy") + O{{"πŸ”Ž Observability"}} + S[("Storage")] + A("πŸ›‘οΈ Authentication") + end + subgraph Application["Application"] + BE("Backend / API") + FE("Frontend") + end + B(["πŸ‘€ Browser"]) --> P + P --> FE & BE + FE <--> BE & A + BE --> S + BE -- metrics --> O + FE -- metrics --> O + style O color:#424242,fill:#FFE0B2 + style A fill:#BBDEFB,color:#424242 + style B stroke:#FFFFFF,fill:#C8E6C9,color:#424242 ``` From 868ae20c66c92f272478c52929d3eadc870bd694 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:13:27 +0200 Subject: [PATCH 14/17] Styling and text --- docs/BASIC_DEVELOPMENT_GUIDE.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/BASIC_DEVELOPMENT_GUIDE.md b/docs/BASIC_DEVELOPMENT_GUIDE.md index 8b1d050..f26d267 100644 --- a/docs/BASIC_DEVELOPMENT_GUIDE.md +++ b/docs/BASIC_DEVELOPMENT_GUIDE.md @@ -9,7 +9,7 @@ By following these steps, you can develop locally or in a managed service like G ```mermaid flowchart LR subgraph Infrastructure["Infrastructure"] - P("Reverse Proxy") + P[["Reverse Proxy"]] O{{"πŸ”Ž Observability"}} S[("Storage")] A("πŸ›‘οΈ Authentication") @@ -24,11 +24,16 @@ flowchart LR BE --> S BE -- metrics --> O FE -- metrics --> O + style P fill:#FFCDD2,color:#424242 style O color:#424242,fill:#FFE0B2 + style S fill:#FFF9C4,color:#424242 style A fill:#BBDEFB,color:#424242 + style BE fill:#00C853,color:#424242 + style FE fill:#2962FF,color:#000000 style B stroke:#FFFFFF,fill:#C8E6C9,color:#424242 + ``` ## πŸ’» Development From dc76e38595f13aadcfafd78953b69521ec2f43b0 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:04:02 +0200 Subject: [PATCH 15/17] Added main getting started guide --- docs/GETTING_STARTED.md | 40 ++++++++++++++++++++++++++++++++++++++++ docs/HOW-TO-DEPLOY.MD | 7 ++++--- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 docs/GETTING_STARTED.md diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md new file mode 100644 index 0000000..7d4f5b7 --- /dev/null +++ b/docs/GETTING_STARTED.md @@ -0,0 +1,40 @@ +# Getting Started with [Your Application Name] + +Welcome to the **[Your Application Name]**! This guide will help you get started with our application and provide links to resources tailored for different audiences. Whether you're a Product Owner, Developer, System Administrator, or End-User, we have the information you need to succeed. + +## Table of Contents +1. [Introduction](#introduction) +2. [Getting Started Guides](#getting-started-guides) + - [Product Owners](#product-owners) + - [Developers](#developers) + - [System Administrators](#system-administrators) + - [End-Users](#end-users) +3. [Additional Resources](#additional-resources) +4. [Feedback](#feedback) + +## Introduction +[Your Application Name] is designed to [briefly describe the purpose and key features of the application]. This guide aims to provide you with the necessary resources to get started quickly and effectively. + +## Getting Started Guides + +### Product Owners +For Product Owners looking to understand the application's capabilities and how it aligns with business goals, visit the following guide: +- **[Getting Started Guide for Product Owners](link-to-po-guide)** + +### Developers +If you're a Developer wanting to set up your development environment and contribute to the codebase, check out: +- **[Getting Started Guide for Developers](link-to-developer-guide)** + +### System Administrators +System Administrators can find deployment and maintenance instructions in: +- **[Getting Started Guide for System Administrators](link-to-admin-guide)** + +### End-Users +End-Users seeking to utilize the application effectively should refer to: +- **[Getting Started Guide for End-Users](link-to-user-guide)** + +## Additional Resources +Explore more resources related to [Your Application Name]: +- [Documentation](link-to-docs) +- [Community Forum](link-to-forum) +- [FAQs](link-to-faqs) diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD index 53ae61d..3bd5845 100644 --- a/docs/HOW-TO-DEPLOY.MD +++ b/docs/HOW-TO-DEPLOY.MD @@ -14,10 +14,11 @@ This document will walk you through the process of deploying pre-built container ## πŸ–₯ Single Host Deployment -The single host deployment strategy provided by [OS2-PROJECTNAME] operates without redundancy. It lacks the capabilities to auto-scale or auto-heal and it is not suited for more complex multi-container applications. +*The single host deployment strategy provided by **[OS2-PROJECTNAME]** operates without redundancy and lacks auto-scaling or auto-healing capabilities.* -> [!CAUTION] Not Recommended for Production Use -> ###### This strategy is a cost-effective solution for short-term, limited use systems such as simple Proof of Concepts (PoC) or test systems. While this option allows for a reduction in initial investment, it introduces a single point of failure in the deployment. This deployment strategy is NOT recommended in production systems unless a comprehensive risk assessment process has been conducted and the associated risks have been documented and accepted. +> [!CAUTION] Not Recommended for Production Use +> ###### This deployment strategy can provide a cost-effective solution for short-term, manually operated, limited-use systems, such as simple Proof of Concepts (PoC) or non-critical applications. However, it presents various risks that could affect system stability and lead to increased operational costs. +> ###### Using this strategy for production systems requires the associated risks to be documented and accepted by the steering committee. ### ⬛ Manual deployment From a4f525986d9674e5210c07384efbf57d69fcc8e6 Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:23:56 +0200 Subject: [PATCH 16/17] Added architecture.md and rename PO + icons --- docs/GETTING_STARTED.md | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 7d4f5b7..314d245 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -4,37 +4,52 @@ Welcome to the **[Your Application Name]**! This guide will help you get started ## Table of Contents 1. [Introduction](#introduction) -2. [Getting Started Guides](#getting-started-guides) +2. [System Architecture](#system-architecture) +3. [Getting Started Guides](#getting-started-guides) - [Product Owners](#product-owners) - [Developers](#developers) - [System Administrators](#system-administrators) - [End-Users](#end-users) -3. [Additional Resources](#additional-resources) -4. [Feedback](#feedback) +4. [Additional Resources](#additional-resources) +5. [Feedback](#feedback) ## Introduction [Your Application Name] is designed to [briefly describe the purpose and key features of the application]. This guide aims to provide you with the necessary resources to get started quickly and effectively. +## Architecture overview +For an overview of the system architecture, including components, relationships, and design decisions, please refer to our dedicated architecture document: + +πŸ—ΊοΈ **[Architecture Overview](link-to-architecture.md)** + +This document provides essential insights into how the application is structured and how its various parts interact. + ## Getting Started Guides -### Product Owners -For Product Owners looking to understand the application's capabilities and how it aligns with business goals, visit the following guide: -- **[Getting Started Guide for Product Owners](link-to-po-guide)** +### Business Stakeholders +For Business Stakeholders looking to understand the application's capabilities and how it aligns with business goals, visit the following guide: + +πŸ›οΈ **[Getting Started Guide for Business Stakeholders](link-to-business-stakeholders-guide)** ### Developers If you're a Developer wanting to set up your development environment and contribute to the codebase, check out: -- **[Getting Started Guide for Developers](link-to-developer-guide)** + +πŸ’» **[Getting Started Guide for Developers](link-to-developer-guide)** ### System Administrators System Administrators can find deployment and maintenance instructions in: -- **[Getting Started Guide for System Administrators](link-to-admin-guide)** + +πŸ§‘β€πŸ”§ **[Getting Started Guide for System Administrators](link-to-admin-guide)** ### End-Users End-Users seeking to utilize the application effectively should refer to: -- **[Getting Started Guide for End-Users](link-to-user-guide)** + +πŸ‘₯ **[Getting Started Guide for End-Users](link-to-user-guide)** ## Additional Resources Explore more resources related to [Your Application Name]: -- [Documentation](link-to-docs) +- [Issue Tracker](link-to-issue-tracker) - [Community Forum](link-to-forum) - [FAQs](link-to-faqs) + +## Feedback +We value your input! If you have suggestions or feedback on this guide or any of the linked resources, please let us know through our feedback form: [Feedback Form Link]. From 33ed981df3294c7f4d5489a139d2918069fb797e Mon Sep 17 00:00:00 2001 From: Jan Maack Kjerbye <50995332+janhalen@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:24:37 +0200 Subject: [PATCH 17/17] Removed specific guides --- docs/BASIC_DEVELOPMENT_GUIDE.md | 77 ----------------- docs/HOW-TO-DEPLOY.MD | 148 -------------------------------- 2 files changed, 225 deletions(-) delete mode 100644 docs/BASIC_DEVELOPMENT_GUIDE.md delete mode 100644 docs/HOW-TO-DEPLOY.MD diff --git a/docs/BASIC_DEVELOPMENT_GUIDE.md b/docs/BASIC_DEVELOPMENT_GUIDE.md deleted file mode 100644 index f26d267..0000000 --- a/docs/BASIC_DEVELOPMENT_GUIDE.md +++ /dev/null @@ -1,77 +0,0 @@ -# Getting Started -Welcome to the basic development guide for [OS2-PROJECTNAME]. - -This guide will help you set up a controlled, isolated development environment using the projects pre-built containers. -By following these steps, you can develop locally or in a managed service like GitHub Codespaces without worrying about conflicts with other software or system libraries. - -## Application architecture - -```mermaid -flowchart LR - subgraph Infrastructure["Infrastructure"] - P[["Reverse Proxy"]] - O{{"πŸ”Ž Observability"}} - S[("Storage")] - A("πŸ›‘οΈ Authentication") - end - subgraph Application["Application"] - BE("Backend / API") - FE("Frontend") - end - B(["πŸ‘€ Browser"]) --> P - P --> FE & BE - FE <--> BE & A - BE --> S - BE -- metrics --> O - FE -- metrics --> O - style P fill:#FFCDD2,color:#424242 - style O color:#424242,fill:#FFE0B2 - style S fill:#FFF9C4,color:#424242 - style A fill:#BBDEFB,color:#424242 - style BE fill:#00C853,color:#424242 - style FE fill:#2962FF,color:#000000 - style B stroke:#FFFFFF,fill:#C8E6C9,color:#424242 - - - -``` - -## πŸ’» Development - -### Requirements -To set up a containerized development and test environment on a local computer or in a hosted developer enviroment a container runtime enviroment is needed. - ---- - - -## Development - -To spin up the project, simply install docker-compose and then run the following -commands: - -``` -$ git clone https://github.com/docker/getting-started-app -$ cd getting-started-app -$ docker compose up -d -``` - -You'll see several container images get downloaded from Docker Hub and, after a -moment, the application will be up and running! No need to install or configure -anything on your machine! - -Simply open to [http://localhost](http://localhost) to see the app up and running! - -Any changes made to either the backend or frontend should be seen immediately -without needing to rebuild or restart the containers. - -To help with the database, the development stack also includes phpMyAdmin, which -can be access at [http://db.localhost](http://db.localhost) (most browsers will -resolve `*.localhost` correctly, so no hosts file changes should be required). - -### Tearing it down - -When you're done, simply remove the containers by running the following command: - -``` -$ docker compose down -``` \ No newline at end of file diff --git a/docs/HOW-TO-DEPLOY.MD b/docs/HOW-TO-DEPLOY.MD deleted file mode 100644 index 3bd5845..0000000 --- a/docs/HOW-TO-DEPLOY.MD +++ /dev/null @@ -1,148 +0,0 @@ ---- -layout: default -title: "πŸš€ How to Deploy" ---- - -# πŸš€ How to Deploy - -This document will walk you through the process of deploying pre-built containers to a single host or a cluster. - -> [!NOTE] Deployment templates -> ###### 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. - -   - -## πŸ–₯ Single Host Deployment - -*The single host deployment strategy provided by **[OS2-PROJECTNAME]** operates without redundancy and lacks auto-scaling or auto-healing capabilities.* - -> [!CAUTION] Not Recommended for Production Use -> ###### This deployment strategy can provide a cost-effective solution for short-term, manually operated, limited-use systems, such as simple Proof of Concepts (PoC) or non-critical applications. However, it presents various risks that could affect system stability and lead to increased operational costs. -> ###### Using this strategy for production systems requires the associated risks to be documented and accepted by the steering committee. - - -### ⬛ Manual deployment -The following steps provide a general guide for manual running a single container application using - a runtime that complies with [the OCI standard for container runtimes](https://opencontainers.org/). While the examples use [podman](https://podman.io), you can replace it with any [OCI](https://opencontainers.org/)-compliant runtime tool that fits your specific needs and system configuration. - -1. **Download the Container Image.** - - Use the `pull` command to download the container image from the registry. Add a tag if needed. - - ```r - $ podman pull : - ``` - -2. **Start the Container** - - Use the run command to start the container. - - ```r - $ podman run :. - ``` - -3. **Verify Status** - - Check if the container is running using the `ps` command. - ```r - $ podman ps - ``` - -4. **Stop and Remove** - - To stop the container, use `stop` and `rm` to remove it. - ```r - $ podman stop - - $ podman rm - ``` - - :books: [Official podman documentation](https://podman.io/docs) - -### πŸ…°οΈ Managed deployment -You can write deployments to execute the above steps with your preferred deployment tool, whether it is -[Ansible](https://www.ansible.com/), [Chef](https://www.chef.io/), [Puppet](https://puppet.com/) or [Salt](https://saltproject.io/). - -The below example uses `ssh` and `ansible-pull` to pull and run a default `local.yml` ansible playbook from a deployment repository. - -###### Ansible playbook example: - -`local.yml` - -```yaml -- hosts: servers - vars: - image_name: 'your_image_name_here' - tasks: - - name: Pull an image - containers.podman.podman_image: - name: "{{ image_name }}" - - - name: Run the container - containers.podman.podman_container: - name: my_container - image: "{{ image_name }}" - state: started - - - name: Verify the container is running - command: "podman ps -a | grep my_container" - register: result - - - name: Fail if container is not running - fail: - msg: "Container is not running" - when: "'my_container' not in result.stdout" -``` - - - -Store the playbook in a dedicated git repository for your deployment and execute it with `ansible-pull` - -```r -$ ssh remote_user@remote_host "ansible-pull -U https://github.com/{USERNAME}/{REPOSITORY}.git -``` - :books: [Official documentation for `ansible-pull`](https://docs.ansible.com/ansible/latest/cli/ansible-pull.html)   |   - :books: [Ansible community documentation - containers.podman](https://docs.ansible.com/ansible/latest/collections/containers/podman/index.html) - -   - -## 🚒 Cluster Deployment - -For 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 [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/ -) - -:books: [What is GitOps?](https://about.gitlab.com/topics/gitops/)   |   -:books: [An illustrated guide to GitOps](https://www.redhat.com/architect/illustrated-guide-gitops) - - -### ♾️ GitOps deployment process -Deploy [OS2-PROJECTNAME] to your cluster in 3 steps: - -1. **Initialize and Synchronize**: - - **Clone the Deployment Templates**: Start by cloning the deployment templates from `https://github.com/{USERNAME}/{REPOSITORY}.git`. - - **Create a New Branch**: Establish a new branch for your modifications to preserve the integrity of the main branch. - -2. **Customize and Collaborate**: - - **Customize the Templates**: Tailor the templates to fit your environment and requirements. - - **Open a Pull Request (PR)**: Submit a PR for your branch, enabling peer review and collaboration. - -3. **Merge and Deploy**: - - **Review and Approve**: Have your team review and approve the PR. - - **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. - -### :gear: Operations - -#### Updating the Application -Explain how to update the application. With GitOps, this is typically done by making a change to the manifests in the Git repository. - -#### Rollbacks -Discuss how to rollback to a previous version of the application. With GitOps, this can be done by reverting the commit in the Git repository. - -#### Monitoring and Logging -Explain how to monitor the health of the application and how to access the logs. Consider integrating with a centralized logging system. - -#### Security -Discuss any security considerations such as network policies, RBAC, and secret management. - -#### Troubleshooting -Provide common troubleshooting steps and known issues. \ No newline at end of file