-
Story
-
Resolution: Done
-
Undefined
-
None
-
None
-
5
-
False
-
None
-
False
-
-
-
AppSvc Sprint 231, AppSvc Sprint 232, AppSvc Sprint 233
Owner: Architect:
Francesco Ilario
Story (Required)
As a Primaza Administrator, I would like to have a command line tool so that I can setup Worker clusters easily.
Background (Required)
As described in Primaza's architecture document, we need to define a simple Command Line Application for Primaza Administrator.
The tool will help Primaza Administrators installing Primaza on a cluster and configuring Worker clusters.
See epic for architecture document link.
Glossary
See glossary in architecture document
Out of scope
- Scaffold Primazactl
- Primaza cluster configuration
- ClusterEnvironment's application and service namespaces
In Scope
- Worker cluster configuration
Approach(Required)
primazactl should be able to configure a Worker Cluster.
In the following you find the inputs needed to configure a Worker cluster.
Required:
- Primaza's Private Key
- ClusterEnvironment name
- Environment name
Optional:
- kubeconfig to use to connect to Primaza (default to $KUBECONFIG)
- context to use to connect to Primaza (default to kubeconfig's currentContext)
- kubeconfig to use to connect to Worker cluster (default to $KUBECONFIG)
- context to use to connect to Worker (default to kubeconfig's currentContext)
Once collected the inputs, the following steps should be accomplished for onboarding a new Worker cluster:
- Use Primaza's Private Key to generate a CertificateSigningRequest (CSR)
- Apply the CSR into the Worker cluster with name primaza-[CLUSTER_ENVIRONMENT_NAME]
- Approve the CSR primaza-[CLUSTER_ENVIRONMENT_NAME]
- After it's generated (could take a few tens of seconds), get the Certificate from CSR's status
- Bake a kubeconfig with Primaza's private key and Worker approved Certificate
- On Primaza, create the following secret:
apiVersion: v1 kind: Secret metadata: name: primaza-<CLUSTER_ENVIRONMENT_NAME>-kubeconfig namespace: <PRIMAZA_NAMESPACE> data: kubeconfig: <KUBECONFIG_DATA_BASE64>
- On Primaza, create the following ClusterEnvironment:
apiVersion: primaza.io/v1alpha1 kind: ClusterEnvironment metadata: name: <CLUSTER_ENVIRONMENT_NAME> namespace: <PRIMAZA_NAMESPACE> spec: environmentName: <ENVIRONMENT_NAME> clusterContextSecret: primaza-<CLUSTER_ENVIRONMENT_NAME>-kubeconfig
Most of the logic is already implemented in our BDD tests (in Python), suggested approach is to leverage on that code to implement primazactl.
In designing the commands provided by primazactl, Git's idea of "plumbing" and "porcelain" commands may inspire you.
Demo requirements(Required)
A great demo would install Primaza on a given cluster and configure another one as Worker using primazactl.
Dependencies
- Define primazactl - 1280
Edge Case
NA
Acceptance Criteria
- Development
primazactl can create and configure Worker Clusters.
primazactl has an help command or parameter for each commands and subcommands.
- QE
There are test cases for Worker Clusters set up.
- Docs
There is a page in our docs dedicated to explaining how to configure a worker cluster using primazactl
Update architecture document with any changes while implementing primazactl
INVEST Checklist
Dependencies identified
Blockers noted and expected delivery timelines set
Design is implementable
Acceptance criteria agreed upon
Story estimated
Legend
Unknown
Verified
Unsatisfied
- depends on
-
APPSVC-1280 Define primazactl
- Closed
- is depended on by
-
APPSVC-1285 Update BDD tests to use primazactl
- Closed
-
APPSVC-1286 primazactl: check user permissions
- Closed