Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
catladder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
catladder
catladder
Commits
9fad9f82
Commit
9fad9f82
authored
2 years ago
by
Dimitri Balidis
Committed by
Marco Wettstein
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update Readme
parent
fe36e470
No related branches found
No related tags found
1 merge request
!40
Update Readme
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+86
-0
86 additions, 0 deletions
README.md
with
86 additions
and
0 deletions
README.md
+
86
−
0
View file @
9fad9f82
# catladder
docs are under construction!
## Swiss Cluster Deployments
### Requirements
1.
Basic setup and understanding for Kubernetes Administration (https://git.panter.ch/panter/wiki/-/wikis/administration/kubernetes)
2.
Access rights to cluster
`skynet-swiss`
(ask #technik if this is missing)
3.
Switch to project
`skynet-swiss`
in Google Cloud Console (https://console.cloud.google.com/)
4.
Copy command for connecting to cluster ch-staging (e.g.
`gcloud container clusters get-credentials...`
)
### Deployment files
You need two files in your repository's root folder:
`catladder.ts`
and
`.gitlab-ci.yml`
.
In the
`.gitlab-ci.yml`
file you can define all the includes you need:
```
include: https://git.panter.ch/api/v4/projects/catladder%2Fcatladder/packages/generic/ci-includes/v1/gitlab-ci.yml
```
The
`catladder.ts`
file defines the whole deployment for Kubernetes. Here's a short example file:
```
import type {
Config,
DeployConfigKubernetesCluster,
} from "@catladder/pipeline";
const PROD_CLUSTER: DeployConfigKubernetesCluster = {
type: "gcloud",
name: "ch-production",
projectId: "skynet-swiss",
region: "europe-west6-a",
domainCanonical: "panter.swiss",
};
const DEV_CLUSTER: DeployConfigKubernetesCluster = {
type: "gcloud",
name: "ch-staging",
projectId: "skynet-swiss",
region: "europe-west6-a",
domainCanonical: "panter.dev",
};
const config: Config = {
customerName: "EXAMPLE CUSTOMER NAME (always 3 letters, lowercase. e.g.: ihz, pvl, vps etc.)",
appName: "EXAMPLE APP NAME (always separated by dashes, lowercase, e.g.: ihz-member-app, pvl-cyclomania-web etc.)",
components: {
// 👉 here you define all the needed, components
web: {
// 👉 define the location for the app to build
dir: ".",
build: {
type: "node",
},
deploy: {
type: "kubernetes",
cluster: DEV_CLUSTER,
},
env: {
prod: {
deploy: {
type: "kubernetes",
cluster: PROD_CLUSTER,
},
},
},
vars: {
// 👉 define public vars
public: {},
// 👉 define the secrets, which will be afterwards set via catladder command project-config-secrets
secret: ["HUB_API_URL"],
},
},
api: {
dir: "./api/
build: {
...
},
...
}
},
};
export default config;
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment