Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ jx create cluster gke
? Google Cloud Project: private-cloud-198808
No cluster name provided so using a generated one: carpcoal
? Google Cloud Zone: us-west1-a
? Google Cloud Machine Type: n1-standard-2
? Minimum number of Nodes 3
? Maximum number of Nodes 5
Creating cluster...
Initialising cluster ...
Trying to create ClusterRoleBinding gke-private-cloud-198808-us-west1-a-carpcoal-cluster-admin-binding for role: cluster-admin for user gke-private-cloud-198808-us-west1-a-carpcoal
Created ClusterRoleBinding gke-private-cloud-198808-us-west1-a-carpcoal-cluster-admin-binding
Created ServiceAccount tiller in namespace kube-system
Trying to create ClusterRoleBinding tiller for role: cluster-admin and ServiceAccount: kube-system/tiller
Created ClusterRoleBinding tiller
Initialising helm using ServiceAccount tiller in namespace kube-system
helm installed and configured
? No existing ingress controller found in the kube-system namespace, shall we install one? Yes
NAME: jxing ingress controller found in the kube-system namespace, shall we install one? [? for help] (Y/n) Y
LAST DEPLOYED: Fri Jun 8 14:27:52 2018
NAMESPACE: kube-system
STATUS: DEPLOYED
RESOURCES:
==> v1/ConfigMap
NAME DATA AGE
jxing-nginx-ingress-controller 1 2s
==> v1/ServiceAccount
NAME SECRETS AGE
jxing-nginx-ingress 1 2s
==> v1beta1/ClusterRole
NAME AGE
jxing-nginx-ingress 2s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
jxing-nginx-ingress-controller 1 1 1 0 1s
jxing-nginx-ingress-default-backend 1 1 1 0 1s
==> v1beta1/ClusterRoleBinding
NAME AGE
jxing-nginx-ingress 2s
==> v1beta1/Role
NAME AGE
jxing-nginx-ingress 2s
==> v1beta1/RoleBinding
NAME AGE
jxing-nginx-ingress 2s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
jxing-nginx-ingress-controller LoadBalancer 10.59.244.203 <pending> 80:30890/TCP,443:32429/TCP 2s
jxing-nginx-ingress-default-backend ClusterIP 10.59.252.220 <none> 80/TCP 1s
==> v1beta1/PodDisruptionBudget
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
jxing-nginx-ingress-controller 1 N/A 0 1s
jxing-nginx-ingress-default-backend 1 N/A 0 1s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
jxing-nginx-ingress-controller-7c4bd99845-kvl59 0/1 ContainerCreating 0 1s
jxing-nginx-ingress-default-backend-66c54ff74b-z6qj8 0/1 ContainerCreating 0 1s
NOTES:
The nginx-ingress controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace kube-system get services -o wide -w jxing-nginx-ingress-controller'
An example Ingress that makes use of the controller:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: example
namespace: foo
spec:
rules:
- host: www.example.com
http:
paths:
- backend:
serviceName: exampleService
servicePort: 80
path: /
# This section is only required if TLS is to be enabled for the Ingress
tls:
- hosts:
- www.example.com
secretName: example-tls
If TLS is enabled for the Ingress, a Secret containing the certificate and key must also be provided:
apiVersion: v1
kind: Secret
metadata:
name: example-tls
namespace: foo
data:
tls.crt: <base64 encoded cert>
tls.key: <base64 encoded key>
type: kubernetes.io/tls
Waiting for external loadbalancer to be created and update the nginx-ingress-controller service in kube-system namespace
Note: this loadbalancer will fail to be provisioned if you have insufficient quotas, this can happen easily on a GKE free account. To view quotas run: gcloud compute project-info describe
External loadbalancer created
? Domain 35.230.49.158.nip.io
nginx ingress controller installed and configured
Lets set up a git username and API token to be able to perform CI/CD
? GitHub username for CI/CD pipelines: grohan2002
Cloning the Jenkins X cloud environments repo to /home/aditi/.jx/cloud-environments
? A local Jenkins X cloud environments repository already exists, recreate with latest? Yes
Cloning the Jenkins X cloud environments repo to /home/aditi/.jx/cloud-environments
Counting objects: 574, done.
Total 574 (delta 0), reused 0 (delta 0), pack-reused 574
Generated helm values /home/aditi/.jx/extraValues.yaml
Installing Jenkins X platform helm chart from: /home/aditi/.jx/cloud-environments/env-gke
helm repo add jenkins-x https://chartmuseum.build.cd.jenkins-x.io
"jenkins-x" has been added to your repositories
rm -rf secrets.yaml.dec
helm repo add jenkins-x https://chartmuseum.build.cd.jenkins-x.io
"jenkins-x" has been added to your repositories
helm repo update
Hang tight while we grab the latest from your chart repositories...
...Skip local chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "jenkins-x" chart repository
Update Complete. ⎈ Happy Helming!⎈
helm install jenkins-x/jenkins-x-platform --name jenkins-x -f ./myvalues.yaml -f ./secrets.yaml --version 0.0.1193 --values=/home/aditi/.jx/gitSecrets.yaml --values=/home/aditi/.jx/adminSecrets.yaml --values=/home/aditi/.jx/extraValues.yaml --namespace=jx --timeout=6000
NAME: jenkins-x
LAST DEPLOYED: Fri Jun 8 14:29:34 2018
NAMESPACE: jx
STATUS: DEPLOYED
RESOURCES:
==> v1beta1/ClusterRoleBinding
NAME AGE
jenkins-role-binding 58s
==> v1beta1/Deployment
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
jenkins-x-chartmuseum 1 1 1 1 58s
jenkins-x-docker-registry 1 1 1 1 58s
jenkins-x-heapster 1 1 1 1 58s
jenkins 1 1 1 0 58s
jenkins-x-mongodb 1 1 1 0 58s
jenkins-x-monocular-api 1 1 1 0 57s
jenkins-x-monocular-prerender 1 1 1 1 57s
jenkins-x-monocular-ui 1 1 1 1 57s
jenkins-x-nexus 1 1 1 0 57s
pipelinecontroller 1 1 1 1 57s
==> v1beta1/CustomResourceDefinition
NAME AGE
pipelines.jenkins.io 57s
runs.jenkins.io 57s
==> v1/Pod(related)
NAME READY STATUS RESTARTS AGE
jenkins-x-chartmuseum-77dcdf7f87-txxrx 1/1 Running 0 58s
jenkins-x-docker-registry-76dd6bddd4-498dr 1/1 Running 0 58s
jenkins-x-heapster-57b558bf9b-9nbg8 2/2 Running 0 58s
jenkins-58848b44cd-fp9kt 0/1 Running 0 57s
jenkins-x-mongodb-5fb7868bd-qp6q2 0/1 ContainerCreating 0 57s
jenkins-x-monocular-api-d7d6cc9b7-2pxn4 0/1 Error 0 57s
jenkins-x-monocular-prerender-74f49ffdc7-jdbhp 1/1 Running 0 57s
jenkins-x-monocular-ui-5dcfbf9d7c-mvxgs 1/1 Running 0 57s
jenkins-x-nexus-786fcdbd98-fgtq7 0/1 ContainerCreating 0 57s
pipelinecontroller-5c5f5df7ff-4ljj5 1/1 Running 0 57s
==> v1/Secret
NAME TYPE DATA AGE
jenkins-x-chartmuseum Opaque 2 58s
jenkins-x-docker-registry-secret Opaque 1 58s
jenkins Opaque 2 58s
jenkins-x-mongodb Opaque 2 58s
nexus Opaque 1 58s
jenkins-docker-cfg Opaque 1 58s
jenkins-git-credentials Opaque 1 58s
jenkins-hub-api-token Opaque 1 58s
jenkins-git-ssh Opaque 2 58s
jx-basic-auth Opaque 1 58s
jenkins-release-gpg Opaque 4 58s
jenkins-maven-settings Opaque 1 58s
jenkins-npm-token Opaque 1 58s
jenkins-ssh-config Opaque 1 58s
==> v1/ConfigMap
NAME DATA AGE
jenkins-x-docker-registry-config 1 58s
exposecontroller 1 58s
jenkins 7 58s
jenkins-x-git-kinds 2 58s
jenkins-tests 1 58s
jenkins-x-monocular-api-config 1 58s
jenkins-x-monocular-ui-config 1 58s
jenkins-x-monocular-ui-vhost 1 58s
jenkins-x-pod-templates 12 58s
==> v1/PersistentVolumeClaim
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
jenkins-x-chartmuseum Bound pvc-43b61a9d-6afa-11e8-818a-42010a8a007f 8Gi RWO standard 58s
jenkins-x-docker-registry Bound pvc-43ba02df-6afa-11e8-818a-42010a8a007f 100Gi RWO standard 58s
jenkins Bound pvc-43bda529-6afa-11e8-818a-42010a8a007f 30Gi RWO standard 58s
jenkins-x-mongodb Bound pvc-43bedec4-6afa-11e8-818a-42010a8a007f 8Gi RWO standard 58s
jenkins-x-nexus Bound pvc-43c0b170-6afa-11e8-818a-42010a8a007f 8Gi RWO standard 58s
==> v1/ServiceAccount
NAME SECRETS AGE
cleanup 1 58s
expose 1 58s
jenkins 1 58s
pipelinecontroller 1 58s
==> v1/Role
NAME AGE
cleanup 58s
expose 58s
==> v1/RoleBinding
NAME AGE
cleanup 58s
expose 58s
==> v1/Service
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
jenkins-x-chartmuseum ClusterIP 10.59.247.18 <none> 8080/TCP 58s
jenkins-x-docker-registry ClusterIP 10.59.251.152 <none> 5000/TCP 58s
heapster ClusterIP 10.59.255.13 <none> 8082/TCP 58s
jenkins-agent ClusterIP 10.59.242.200 <none> 50000/TCP 58s
jenkins ClusterIP 10.59.252.154 <none> 8080/TCP 58s
jenkins-x-mongodb ClusterIP 10.59.243.233 <none> 27017/TCP 58s
jenkins-x-monocular-api ClusterIP 10.59.242.193 <none> 80/TCP 58s
jenkins-x-monocular-prerender ClusterIP 10.59.255.226 <none> 80/TCP 58s
jenkins-x-monocular-ui ClusterIP 10.59.242.187 <none> 80/TCP 58s
nexus ClusterIP 10.59.240.56 <none> 80/TCP 58s
waiting for install to be ready, if this is the first time then it will take a while to download images
Jenkins X deployments ready in namespace jx
********************************************************
NOTE: Your admin password is: pirateclear
********************************************************
Getting Jenkins API Token
unable to automatically find API token with chromedp using URL http://jenkins.jx.35.230.49.158.nip.io/me/configure
Please go to http://jenkins.jx.35.230.49.158.nip.io/me/configure and click Show API Token to get your API Token
Then COPY the token and enter in into the form below:
Created user admin API Token for Jenkins server jenkins.jx.35.230.49.158.nip.io at http://jenkins.jx.35.230.49.158.nip.io
Creating default staging and production environments
Using git provider GitHub at https://github.com
About to create repository environment-carpcoal-staging on server https://github.com with user grohan2002
? Which organisation do you want to use? grohan2002
Creating repository grohan2002/environment-carpcoal-staging
Creating git repository grohan2002/environment-carpcoal-staging
Cloning into '/home/aditi/.jx/environments/grohan2002/environment-carpcoal-staging'...
remote: Counting objects: 67, done.
remote: Total 67 (delta 0), reused 0 (delta 0), pack-reused 67
Unpacking objects: 100% (67/67), done.
Checking connectivity... done.
[master f2045e1] Use correct namespace for environment
1 file changed, 1 insertion(+), 1 deletion(-)
[master 85e3e03] Add environment configuration
1 file changed, 9 insertions(+)
Counting objects: 74, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (71/71), done.
Writing objects: 100% (74/74), 13.71 KiB | 0 bytes/s, done.
Total 74 (delta 39), reused 0 (delta 0)
remote: Resolving deltas: 100% (39/39), done.
To https://grohan2002:0468f81bbf086353d5a03a2a8125d5642bd1d6f6@github.com/grohan2002/environment-carpcoal-staging.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
Pushed git repository to https://github.com/grohan2002/environment-carpcoal-staging
Created environment staging
? user name for the Jenkins Pipeline grohan2002
Created Jenkins Project: http://jenkins.jx.35.230.49.158.nip.io/job/grohan2002/job/environment-carpcoal-staging/
Note that your first pipeline may take a few minutes to start while the necessary docker images get downloaded!
Creating github webhook for grohan2002/environment-carpcoal-staging for url http://jenkins.jx.35.230.49.158.nip.io/github-webhook/
Using git provider GitHub at https://github.com
About to create repository environment-carpcoal-production on server https://github.com with user grohan2002
? Which organisation do you want to use? grohan2002
Creating repository grohan2002/environment-carpcoal-production
Creating git repository grohan2002/environment-carpcoal-production
Cloning into '/home/aditi/.jx/environments/grohan2002/environment-carpcoal-production'...
remote: Counting objects: 67, done.
remote: Total 67 (delta 0), reused 0 (delta 0), pack-reused 67
Unpacking objects: 100% (67/67), done.
Checking connectivity... done.
[master 841d795] Use correct namespace for environment
1 file changed, 1 insertion(+), 1 deletion(-)
[master 064603d] Add environment configuration
1 file changed, 9 insertions(+)
Counting objects: 74, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (71/71), done.
Writing objects: 100% (74/74), 13.72 KiB | 0 bytes/s, done.
Total 74 (delta 39), reused 0 (delta 0)
remote: Resolving deltas: 100% (39/39), done.
To https://grohan2002:0468f81bbf086353d5a03a2a8125d5642bd1d6f6@github.com/grohan2002/environment-carpcoal-production.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
Pushed git repository to https://github.com/grohan2002/environment-carpcoal-production
Created environment production
Created Jenkins Project: http://jenkins.jx.35.230.49.158.nip.io/job/grohan2002/job/environment-carpcoal-production/
Note that your first pipeline may take a few minutes to start while the necessary docker images get downloaded!
Creating github webhook for grohan2002/environment-carpcoal-production for url http://jenkins.jx.35.230.49.158.nip.io/github-webhook/
Jenkins X installation completed successfully
********************************************************
NOTE: Your admin password is: pirateclear
********************************************************
To import existing projects into Jenkins: jx import
To create a new Spring Boot microservice: jx create spring -d web -d actuator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment