diff --git a/README.md b/README.md index 8e556e9..c1b7306 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,37 @@ # html-nginx-deployemnt -A template repo for deploying basic HTML inside an NGINX pod in a Kubernetes Cluster, with Jenkins CI/CD integration. \ No newline at end of file +A template repo for deploying basic HTML inside an NGINX pod in a Kubernetes Cluster, with Jenkins CI/CD integration. + +> NOTE: The steps below are not for this repo, but for those using it as a template. + +## Bootstrapping +> If needed, steps starting with `[sudo]` require elevated permissions. + +1. Create a new repository by clicking the "Use this template" button on the template repo page. +1. Configure the new repo settings. At the bottom, select `Template Items` -> `Git Content`. +1. Create the new repo. +1. Pull new repo to local PC. +1. [sudo] Give the setup script permission to execute: + ```bash + chmod +x template/setup.sh + ``` +1. [sudo] Run the start script and fill in the prompts: + ```bash + ./template/setup.sh + ``` + +## Running Locally +> This works only if the required files have been made during the bootstrap process. +1. You need to have Docker locally installed, as this will be using an NGINX +container to host the files locally. +1. From the repository root directory: + ```bash + ./start.sh + ``` + +## Deploying +If you configured the Sciocatti Jenkins pipeline during bootstrap, deployment happens automatically on branches `stage`, `main`, `prod`. + +These will be deployed to node ports on the cluster with ports as per the `deployment.yaml` specs in the `cicd` folder. + +> Due note that branches eligible for deployments are configured on the Jenkins server, as deployments happen transparently to developers. \ No newline at end of file