curl -L https://github.com/jenkins-x/jx/releases/download/v3.10.83/jx-linux-amd64.tar.gz | tar xzv
chmod +x jx
sudo mv jx /usr/local/bin
[root@k8s-master ~]# curl -L https://github.com/jenkins-x/jx/releases/download/v3.10.83/jx-linux-amd64.tar.gz | tar xzv
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
LICENSE
README.md
jx
7 20.9M 7 1672k 0 0 1761k 0 0:00:12 --:--:-- 0:00:12 1761k
100 20.9M 100 20.9M 0 0 11.7M 0 0:00:01 0:00:01 --:--:-- 23.1M
[root@k8s-master ~]# chmod +x jx
[root@k8s-master ~]# sudo mv jx /usr/local/bin
[root@k8s-master ~]#
[root@k8s-master ~]#
[root@k8s-master ~]#
[root@k8s-master ~]#
[root@k8s-master ~]#
[root@k8s-master ~]#
[root@k8s-master ~]#
[root@k8s-master ~]# jx version
version: 3.10.83
shaCommit: a2b68621c3c1c21be928ccbe5de84fbc3ce20e34
buildDate: Tue Apr 4 13:26:15 UTC 2023
goVersion: 1.19.3
branch: main
gitTreeState: clean
[root@k8s-master ~]# jx --help
Jenkins X 3.x command line
General:
dashboard View the Jenkins X Pipelines Dashboard
namespace View or change the current namespace context in the current Kubernetes cluster
ui Views the Jenkins X UI (octant)
upgrade Upgrades resources
version Displays the version of this command
add Adds one or more resources
get Display one or more resources
create Create one or more resources
start Starts a resource
stop Stops a resource
import alias for: jx project import
ctx alias for: jx context
Other Commands:
help Help about any command
Other Commands
admin admin binary (from plugin)
application application binary (from plugin)
changelog changelog binary (from plugin)
gitops gitops binary (from plugin)
health health binary (from plugin)
pipeline pipeline binary (from plugin)
preview preview binary (from plugin)
project project binary (from plugin)
promote promote binary (from plugin)
secret secret binary (from plugin)
test test binary (from plugin)
verify verify binary (from plugin)
Usage:
jx [flags] [options]
Use "jx <command> --help" for more information about a given command.
[root@k8s-master ~]#
git clone Repository
jx-requirements.yml
file and modify the ingress.domain
section…cluster:
---
ingress:
domain: ''
git add *
git commit -a -m "fix: added domain"
git push origin main
[root@k8s-master ~]# jx admin operator --url=https://github.com/kernelpod/jx3-kubernetes.git --username kernelpod --token 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
Installing plugin jx-admin version 0.2.2 for command jx admin from https://github.com/jenkins-x-plugins/jx-admin/releases/download/v0.2.2/jx-admin-linux-amd64.tar.gz into /root/.jx3/plugins/bin
git clone URL is https://github.com/kernelpod/jx3-kubernetes.git
now verifying we have a valid git username and token so that we can clone the git repository inside kubernetes...
git username is kernelpod for URL https://github.com/kernelpod/jx3-kubernetes.git and we have a valid password
Installing plugin helm version 3.6.2 for command jx helm from https://get.helm.sh/helm-v3.6.2-linux-amd64.tar.gz into /root/.jx3/plugins/bin
running command:
/root/.jx3/plugins/bin/helm-3.6.2 upgrade --install \
--set url=https://github.com/kernelpod/jx3-kubernetes.git \
--set username=kernelpod \
--set password=**** --namespace jx-git-operator --create-namespace jxgo jxgh/jx-git-operator
switched to namespace jx-git-operator so that you can start to create or import projects into Jenkins X: https://jenkins-x.io/docs/v3/create-project/
waiting for the Git Operator to be ready in namespace jx-git-operator...
pod jx-git-operator-8b8f69fc-wmk94 has status Pending
pod jx-git-operator-8b8f69fc-wmk94 has status Ready
the Git Operator is running in pod jx-git-operator-8b8f69fc-wmk94
waiting for boot Job pod with selector app=jx-boot in namespace jx-git-operator...
waiting for Job jx-boot-63cb1f21-4c5e-46bf-89e8-4da1278edff7 to complete...
pod jx-boot-63cb1f21-4c5e-46bf-89e8-4da1278edff7-m69k6 has status Ready
tailing boot Job pod jx-boot-63cb1f21-4c5e-46bf-89e8-4da1278edff7-m69k6
jx gitops git setup
setup git user email jenkins-x@googlegroups.com
generated Git credentials file: /workspace/xdg_config/git/credentials with username: kernelpod email:
jx gitops apply
Can't find namespace jx. Assuming this is a new cluster: namespaces "jx" not found
found last commit message: fix: added domain
make regen-phase-1 NEW_CLUSTER=true
make[1]: Entering directory '/workspace/source'
jx gitops git setup
setup git user email jenkins-x@googlegroups.com
generated Git credentials file: /workspace/xdg_config/git/credentials with username: kernelpod email:
Already up to date.
jx gitops requirements merge
there is no ConfigMap terraform-jx-requirements in namespace default so no need to merge requirements
jx gitops requirements resolve -n
WARNING: no email in secret jx-boot in namespace jx-git-operator
modified the pipeline user in /workspace/source/jx-requirements.yml
no resolve logic for kubernetes provider kubernetes
jx gitops repository create
file does not exist: .jx/gitops/source-config.yaml so not defaulting any SourceConfig resources
jx gitops repository resolve --source-dir config-root/namespaces
jx gitops jenkins jobs
the source config file .jx/gitops/source-config.yaml does not exist
jx secret convert edit
jx gitops helmfile resolve
jx gitops image -s .jx/git-operator
helmfile --file helmfile.yaml template --validate --include-crds --output-dir-template /tmp/generate/{{.Release.Namespace}}/{{.Release.Name}}
Adding repo jxgh https://jenkins-x-charts.github.io/repo
"jxgh" has been added to your repositories
Templating release=jxboot-helmfile-resources, chart=jxgh/jxboot-helmfile-resources
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/build-bot-serviceaccount.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jx-gcactivities-sa.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jx-gcjobs-sa.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jx-gcpods-sa.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jx-basic-auth-htpasswd-secret.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jx-basic-auth-user-password-secret.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/local-secrets.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/maven-settings-secret.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/tekton-container-registry-auth-secret.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/tekton-git-secret.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/ingress-config-configmap.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jenkins-x-docker-registry.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jenkins-x-extensions-config.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/kapp-config.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/build-bot-clusterrole.yaml
wrote /tmp/generate/jx/jxboot-helmfile-resources/jxboot-helmfile-resources/templates/jenkins-x-aggregate-view.yaml
......
This command will use helm to install the git operator which will trigger a Job to install Jenkins X (and re-trigger a Job whenever you commit to your git repository).
The terminal will display the logs as the boot Job
runs.
Jenkins X will now install itself.
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。