jx boot failing in step create values for local storage

Created on 28 Nov 2019  路  10Comments  路  Source: jenkins-x/jx

Summary

jx boot failing in step create values for local storage . Tried updating jx-requirements.yml with secretStorage as vault as well. But that too didnt work.

I have installed Jenkins-X (jx boot) in Kubernetes cluster with provider as 'kubernetes'

Even Tried issuing'

jx install --provider=aws --external-ip=x.x.x.x --skip-ingress --domain=x.x.x.x.nip.io --docker-registry=localhost:5000' 

Initially this worked with success message as 'Jenkins X installation completed successfully' but when create a test project 'jx create spring' , it failed in Build Step giving error like 'unable to connect to localhost:5000 '

So re-installed using jx install , but then it was in waiting mode as nexus pod kept on crashloopbackoff

So installed again using

jx boot

but this is failing

Steps to reproduce the behavior

jx boot in Kubernetes cluster (AWS)

Expected behavior

Jenkins X installation completed successfully

Actual behavior

Error :

[email protected]:~/jenkins-x-boot-config/env$ jx step create values --name parameters
No --namespace option specified or $DEPLOY_NAMESPACE environment variable available so defaulting to using namespace jx
defaulting to secret storage scheme local found from requirements file at /home/ubuntu/jenkins-x-boot-config/jx-requirements.yml
defaulting to secret base path to the cluster name kubernetes-admin@kubernetes found from requirements file at /home/ubuntu/jenkins-x-boot-config/jx-requirements.yml
generated schema file /home/ubuntu/jenkins-x-boot-config/env/parameters.schema.json from template /home/ubuntu/jenkins-x-boot-config/env/parameters.tmpl.schema.json

Jenkins X Admin Username admin [Automatically accepted existing value]
Jenkins X Admin Password * [Automatically accepted existing value]
Pipeline bot Git username XXX[Automatically accepted existing value]
Pipeline bot Git email address [email protected] [Automatically accepted existing value]
Pipeline bot Git token
[Automatically accepted existing value]
HMAC token, used to validate incoming webhooks. Press enter to use the generated token
[Automatically accepted existing value]
Do you want to configure an external Docker Registry?By default Jenkins X will use the docker registry from the cloud provider. If you want to configure an external docker registry such as Docker Hub or your own existing docker registry enter YDocker Registry Url https://index.docker.io/v1/ [Automatically accepted existing value]
Docker Registry username XXX[Automatically accepted existing value]
Docker Registry password *
[Automatically accepted existing value]
Docker Registry email [email protected] [Automatically accepted existing value]
error: error enabling access to an external docker registry: failed to convert secret URLs in parameters file /home/ubuntu/jenkins-x-boot-config/env/parameters.yaml: replacing vault paths in adminUser:
password: local:kubernetes-admin@kubernetes/adminUser:password
username: admin
docker:
email: [email protected]
password: local:kubernetes-admin@kubernetes/docker:password
url: https://index.docker.io/v1/
username: xxx
enableDocker: true
pipelineUser:
email: [email protected]
token: local:kubernetes-admin@kubernetes/pipelineUser:token
username: XXX
prow:
hmacToken: local:kubernetes-admin@kubernetes/prow:hmacToken
: cannot parse "kubernetes-admin" as path:key

Jx version

The output of jx version is:

NAME               VERSION
jx                 2.0.1029
Kubernetes cluster v1.14.9
kubectl            v1.14.0
helm client        v2.14.0+g05811b8
helm server        v2.14.0+g05811b8
git                2.17.1
Operating System   Ubuntu 18.04.3 LTS

Jenkins type

  • [- ] Serverless Jenkins X Pipelines (Tekton + Prow)
  • [ ] Classic Jenkins

Kubernetes cluster

Kubernetes cluster created using ansible scripts in AWS EC2 ubuntu instances


Kubernetes cluster in AWS with 1 master and 3 worker nodes

Operating system / Environment

ubuntu 18.04


ubuntu

areaws areboot kinbug lifecyclrotten prioritimportant-longterm

All 10 comments

@prashankprince Is this a custom cluster running on AWS or an EKS cluster?

@prashankprince Is this a custom cluster running on AWS or an EKS cluster?

Hi @ccojocar , this is custom cluster running on AWS

boot has been tested with EKS.

So i have used jx install --provider="kubernetes" --domain="<domain_name>" --skip-ingress="true" --docker-registry=docker-registry.<domain_name> with custom domain name

So far working fine, but facing issue with flagger

I have the same issue trying to install to an onprem kubernetes cluster. Seems vault is not setup and I actually don't care about not using one for the sake of testing. I am using the jx boot command that shows:

error: failed to interpret pipeline file jenkins-x.yml: failed to run '/bin/sh -c jx step create values --name parameters' command in directory 'env', output: ''

parameters.yaml has some references to a a vault, is there anyway to either have this setup automatically or at least point to documentation?
This didn't help:
https://jenkins-x.io/docs/reference/components/docker-registry/#update-the-config-json-secret
the command
jx create docker auth --host "foo.private.docker.registry" --user "foo" --secret "FooDockerHubToken" --email "[email protected]"

doesn't seem to do anything.
jx console doesn't work (and shows it will be deprecated) so I'm stuck there.

Also, most things found online point to the old documentation that doesn't seem applicable anymore.
Also, the secretStorage is set to local, not vault, so it seems like a bug :
jx-requirements.yml:secretStorage: local

does anyone know a workaround or fix to proceed? I have a local registry

I found the cause of the issue, it was the clustername having a space in jx-requirements.yml.
The process later on stops parsing at the space and thus looks in the wrong place for the values. Not sure if it's mentioned to not have spaces somewhere, but might be good to catch it either at the beginning (for example stop install when name has space) or fix the parser for the env/paramters.yml.

The process continues then but I get :
configmap/config-observability created
deployment.apps/tekton-pipelines-controller created
unable to recognize "/tmp/helm-template-workdir-348085871/jenkins-x/output/namespaces/jx/env/charts/jenkins-x-platform/charts/chartmuseum/templates/part0-deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "/tmp/helm-template-workdir-348085871/jenkins-x/output/namespaces/jx/env/charts/jenkins-x-platform/charts/docker-registry/templates/part0-deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "/tmp/helm-template-workdir-348085871/jenkins-x/output/namespaces/jx/env/charts/jenkins-x-platform/charts/heapster/templates/part0-deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
unable to recognize "/tmp/helm-template-workdir-348085871/jenkins-x/output/namespaces/jx/env/charts/jenkins-x-platform/charts/jenkins/templates/part0-jenkins-master-deployment.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"'
error: failed to interpret pipeline file jenkins-x.yml: failed to run '/bin/sh -c jx step helm apply --boot --remote --name jenkins-x --provider-values-dir ../kubeProviders' command in directory 'env', output: ''

It seems that was reported here:
https://github.com/jenkins-x/jx/issues/5675

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

@jenkins-x-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

Was this page helpful?
0 / 5 - 0 ratings