jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
https://jenkins-x.io/
Apache License 2.0
4.58k stars 788 forks source link

jenkins-x installation never succeed on local Kubernetes 1.10 cluster! #1019

Closed dongdan39 closed 5 years ago

dongdan39 commented 6 years ago

Hi, When I tried to install jenkins-x on my local Kubernetes 1.10 cluster, it never succeeds! On the master node of the kubernetes cluster:

helm version

Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}

jx install --ingress-namespace kube-system

.... helm install jenkins-x/jenkins-x-platform --name jenkins-x -f ./myvalues.yaml -f ./secrets.yaml --version 0.0.1129 --values=/root/.jx/gitSecrets.yaml --values=/root/.jx/adminSecrets.yaml --values=/root/.jx/extraValues.yaml --namespace=jx --timeout=6000 Error: a release named jenkins-x already exists. Run: helm ls --all jenkins-x; to check the status of the release Or run: helm del --purge jenkins-x; to delete it make: *** [install] 错误 1 Error: Command failed make ARGS=--values=/root/.jx/gitSecrets.yaml --values=/root/.jx/adminSecrets.yaml --values=/root/.jx/extraValues.yaml --namespace=jx --timeout=6000 install error: exit status 2

helm ls --all jenkins-x

NAME REVISION UPDATED STATUS CHART NAMESPACE jenkins-x 1 Thu May 31 01:07:34 2018 FAILED jenkins-x-platform-0.0.1129 jx

helm del --purge jenkins-x

Error: timed out waiting for the condition

Found the installation is stuck in creating of PersistentVolume for jenkins, jenkins-x-chartmuseum, jenkins-x-docker-registry etc. So how the default "jx install" will handle the PV/PVC in installation on local Kubenetes cluster? Seems it will defenitely fail forever! Did anybody ever succeed in jenkins-x installation on such local Kubernetes cluster?

Better to make the installation process more readable and customizable instead of a blackbox with many failures and let people check and debug for a long time... Thanks!

Cheers, Dan

kbaegis commented 6 years ago

+1 Ran into this as well. I just manually recreated my dynamic provisioning secret and namespace prior to running jx install:

kubectl create -f jenkins.yaml

apiVersion: v1
kind: Namespace
metadata:
  creationTimestamp: null
  name: jenkins
spec: {}
status: {}
---
apiVersion: v1
kind: Secret
metadata:
  creationTimestamp: null
  name: ceph-secret-user
  namespace: jenkins
data:
  key: <REMOVED>
type: kubernetes.io/rbd

jx install --namespace jenkins --git-api-token='<gogs-token>' --git-provider-url=<local repo> --git-username=<api-token-user>

Deployment is still busted, even after storage workaround:

NAME                                             READY     STATUS              RESTARTS   AGE
expose-24cg6                                     0/1       Error               0          19m
... (x100)
expose-zkvnv                                     0/1       Error               0          1m
expose-zn2ps                                     0/1       Error               0          17m
expose-zps4x                                     0/1       Error               0          9m
expose-zsqxp                                     0/1       Error               0          16m
jenkins-84b6b544db-8cn8z                         1/1       Running             0          30m
jenkins-x-chartmuseum-5bfc74798d-9fwxr           1/1       Running             0          30m
jenkins-x-docker-registry-f5f9b7bc9-p6dn6        1/1       Running             0          30m
jenkins-x-heapster-c6d44bc95-kzqsw               1/2       CrashLoopBackOff    7          30m
jenkins-x-mongodb-77c6dc684c-8l6rz               1/1       Running             0          30m
jenkins-x-monocular-api-597b5d7575-k854w         0/1       CrashLoopBackOff    10         30m
jenkins-x-monocular-prerender-64f989797b-rdtfh   1/1       Running             0          30m
jenkins-x-monocular-ui-7dbf8ddddb-29n4d          0/1       Running             8          30m
jenkins-x-nexus-7995877df5-dctln                 1/1       Running             0          30m
pipelinecontroller-55d65ccc6-9fxbz               1/1       Running             0          30m
jstrachan commented 6 years ago

what kind of cluster did you create + what tool did you use to create it? It sounds like we need to ensure there's a PV storage class created for your cluster.

I wonder what the output of jx compliance run / jx compliance report gives?

emborg commented 6 years ago

Could you tell where jx gets helm manifests? So that to update manifests to use our custom pv/pvc? Is it possible to use updated manifests with jx?

johnaoss commented 6 years ago

@emborg While the actual charts are hosted on Jenkins X's Chartmuseum instance, the versions used are available here: https://github.com/jenkins-x/jenkins-x-platform/blob/master/requirements.yaml

rawlingsj commented 5 years ago

We now have better docs for installing onpremise including the storage class prereq https://jenkins-x.io/getting-started/install-on-cluster/

Closing this issue but please open a new specific issue if there's anything we've missed. Thanks.