Helper tool to bootstrap the deployment config and kustomize setup for a new project
In order to use this, just run the following command in a bash shell
./bootstrap.shOr in Powershell
.\bootstrap.ps1Both scripts do the exact same thing. You will be asked to provide the following information
- The OpenShift project name you want to bootstrap
- How many environments you need (max 5)
- For each of the environments, you'll be asked the short name (eg: dev, test, prod)
- And the corresponding OpenShift environment name (eg: online-dev, online-test etc.)
Once this is done, the script will copy the contents of the Deployments folder into a new folder build that will contain one folder with the name of the project you indicated.
So the resulting tree structure will be as follows (assuming envs chosen were dev, test and prod)
build
└── Deployments
└── yourprojectname
├── base
│ ├── deployment.yaml
│ ├── kustomization.yaml
│ ├── route.yaml
│ └── service.yaml
└── overlays
├── dev
│ ├── kustomization.yaml
│ └── sizing.yaml
├── prod
│ ├── kustomization.yaml
│ └── sizing.yaml
└── test
├── kustomization.yaml
└── sizing.yaml
You can copy the Deployments folder to your project and commit it, or if you are generating a new base set of deployment scripts for another service, just copy the yourprojectname folder to the Deployments folder in your project.
- Add in an option for number of replicas during the environment phase with a default of 1 replica