CLI for paradigmadigital
2.5K
Prerequisites:
docker run --rm paradigmadigital/pd-cli cli install | bash
docker run --rm paradigmadigital/pd-cli cli update | bash
Reload shell
source ~/.bashrc (or source ~/.zshrc)
Use:
ā pd
Commands availables:
- pd cli
- pd create
- pd deploy
- pd go
- pd help
- pd run
- pd sync
- pd version
version: x.y.z
cli commands for installation and update the cli.
ā pd cli
Commands availables:
- pd cli install
- pd cli update
options:
-debug=true (default: false)
-namespace={value} (take first NAMESPACE in gluon.sh )
example: pd sync -debug=true -namespace=santi
Synchronize helm repository with kubernetes cluster.
Needs gluon.sh file with these parameters:
RELEASE_NAME="pacifier-cicd"
RELEASE_NAME: name of the chart in the repository
example: pd deploy
Create flux source and flux helmrelease.
Needs gluon.sh file with these parameters:
FLUX_REPOS=(
"https://git.paradigmadigital.com/pacifier/deployments/intranet-employee-back-deploy?main?3m?git-auth?dev-pacifier"
)
FLUX_REPOS: "https://${git-repository}?${branch}?${refresh_interval}?${git_secret_name}?${namespace}"
shows all cli contains within this cli
Commands availables:
- pd run flux
- pd run gcloud
- pd run git
- pd run helm
- pd run jar
- pd run kubectl
- pd run mvn
- pd run terraform
alias for other cli commands installed
alias pdk='pd run kubectl'
alias pdh='pd run helm'
alias pdg='pd run gcloud'
alias pdf='pd run flux'
alias pdt='pd run terraform'
kubectl command proxy: Execute all commands as kubectl cli
Use alias:
alias pdk='pd run kubectl'
https://kubernetes.io/docs/reference/kubectl/kubectl/ā
helm command proxy: Execute all commands as helm cli
Use alias:
alias pdh='pd run helm'
flux command proxy: Execute all commands as flux cli
Use alias:
alias pdf='pd run flux'
gcloud command proxy: Execute all commands as gcloud cli
Use alias:
alias pdg='pd run gcloud'
https://cloud.google.com/sdk/gcloud#command_groupsā
Example: batch.init
create
sync
The command pd go init will execute all pd commands in batch.
using module parameter:
pd go init -module=one-module
The command pd go init will execute all pd commands in ./modules/one-module/batch.init
Create a scaffolded element of types in scaffold repositories
variable SCAFFOLDS_REPO could be override in gluon.sh, default value is https://git.paradigmadigital.com/pacifier/catalog/scaffolds/helm-chart-deployments.gitā
~ pd create
Enter type: pacifier-cicd
Enter name: intranet
~ ls -las
total 24
4 drwxrwxr-x 3 sgarciabonacho sgarciabonacho 4096 ene 21 16:52 .
4 drwxrwxr-x 5 sgarciabonacho sgarciabonacho 4096 ene 21 16:52 ..
4 drwxr-xr-x 2 sgarciabonacho docker 4096 ene 21 16:52 chart
4 -rw-r--r-- 1 sgarciabonacho docker 18 ene 21 16:52 .gitignore
4 -rw-r--r-- 1 sgarciabonacho docker 42 ene 21 16:52 gluon.sh
4 -rw-r--r-- 1 sgarciabonacho docker 28 ene 21 16:52 README.md
shows all commands list
Show all installed tools versions:
pd version
versions:
pd-cli: (paradigma digital CLI) - 0.5.3
kubectl: not installed!
mvn: image - maven 3.8.4-jdk-11-slim 9c0a4893bfa4 4 weeks ago 446MB
------------------------
[COMMAND]:mvn --version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /usr/share/maven
Java version: 11.0.13, vendor: Oracle Corporation, runtime: /usr/local/openjdk-11
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-96-generic", arch: "amd64", family: "unix"
------------------------
jar: image - openjdk 18-jdk-alpine c89120dcca4c 8 weeks ago 329MB
------------------------
[COMMAND]:jar --version
jar 18-ea
------------------------
git: image - bitnami/git latest 80cb99d57266 45 hours ago 116MB
------------------------
[COMMAND]:git version
git version 2.34.1
------------------------
flux: image - fluxcd/flux-cli v0.23.0 ccf8922658fc 2 months ago 97.8MB
------------------------
[COMMAND]:flux --version
flux version 0.23.0
------------------------
helm: image - alpine/helm latest c410ba5c447a 6 weeks ago 67.3MB
------------------------
[COMMAND]:helm version
version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.16.10"}
------------------------
gcloud: image - google/cloud-sdk latest ca2633cf6a18 5 days ago 2.6GB
------------------------
[COMMAND]:gcloud version
Google Cloud SDK 369.0.0
alpha 2022.01.14
app-engine-go 1.9.72
app-engine-java 1.9.93
app-engine-python 1.9.98
app-engine-python-extras 1.9.96
beta 2022.01.14
bigtable
bq 2.0.72
cbt 0.10.2
cloud-datastore-emulator 2.1.0
cloud-firestore-emulator 1.13.1
cloud-spanner-emulator 1.4.0
core 2022.01.14
datalab 20190610
gsutil 5.6
kpt 1.0.0-beta.9
local-extract 1.3.2
pubsub-emulator 0.6.0
------------------------
Content type
Image
Digest
sha256:6cfe1efc0ā¦
Size
151.7 MB
Last updated
over 3 years ago
docker pull paradigmadigital/pd-cli