Files
wedding-page/README.md
Home-Cluster d0689a1ae5 Initial commit
2023-01-07 15:59:18 +00:00

39 lines
1.6 KiB
Markdown

# html-nginx-deployemnt
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.
> Note that the bootstrapped repo has to be in a organization where the Jenkins user has visibility, and the organization must be configured and linked to the Jenkins server.