Install jx on minishift
Proxy
Start lantern
on Ubuntu.
lantern -addr 192.168.0.105:37103
Never try
lantern -addr 0.0.0.0:37103
jx install
will fail due to::37103
install minishift
- Download minishift from https://github.com/minishift/minishift/releases.
- Create a soft link /usr/local/bin/minishift to the binary.
create cluster
Create ministart.sh
to start minishift with the same parameters every time.
#!/bin/bash
minishift start --cpus 4 --disk-size 40GB --memory 32GB \
--http-proxy http://192.168.0.105:37103 --https-proxy \
http://192.168.0.105:37103 \
--no-proxy *.svc \
--skip-registration --skip-startup-checks
Then, create the cluster by the sh file. There may be serval errors during the starting up time which can be ignored by restarting.
install jx
Install jx by following the instructions from at https://jenkins-x.io/getting-started/install/
mkdir -p ~/.jx/bin
curl -L https://github.com/jenkins-x/jx/releases/download/v1.3.640/jx-linux-amd64.tar.gz | tar xzv -C ~/.jx/bin
export PATH=$PATH:~/.jx/bin
echo 'export PATH=$PATH:~/.jx/bin' >> ~/.bashrc
-
start minishift by
./ministart.sh
-
eval $(minishift oc-env)
-
login as developer by
oc login -u developer -p dev
-
grant developer permissions,
oc adm policy --as system:admin add-cluster-role-to-user cluster-admin developer
-
install packages to minishift by
jx install --provider=minishift
-
disable proxy in the browser, then open jenkins-jx route to login
jenkins-admin
by OAuth -
open jx project to find
jenkins-docker-cfg
secret. Reveal it to get the content, like -
copy the content to an online base64 tool to change the registry from
docker-registry.default.svc:5000
to172.30.1.1:5000
-
create secret from the json of
jenkins-docker-cfg
with new base64 encoded secret
apiVersion: v1
data:
config.json: >-
eyJhdXRocyI6IHsiMTcyLjMwLjEuMTo1MDAwIjogeyJhdXRoIjogImMyVnlkbWxqWldGalkyOTFiblE2WlhsS2FHSkhZMmxQYVVwVFZYcEpNVTVwU1hOSmJYUndXa05KTmtscFNqa3VaWGxLY0dNelRXbFBhVXB5WkZkS2JHTnROV3hrUjFaNlRETk9iR051V25CWk1sWm9XVEpPZG1SWE5UQkphWGRwWVROV2FWcFlTblZhV0ZKc1kzazFjR0o1T1hwYVdFb3lZVmRPY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k4wZ3dZV2x6VjFWVlJFTldTRVpXVFVOWGRreHJlWFJtTVVWVFVHVnZVWGRvTVROTlYyRkhTV3Q1VFV4ellUUlZiMnhFZVRKVmNVbDJaVEpSU0ZCbVJqWm5XSE5yTjJoalJUVjZZVlJaZGxkSmQxZHJXVFJ0VlhsNVQyVlBaaTF2Wm5WSWNtMTRMV3AxZFVKdGEwWmhkRFJPU0VKcVdqZFFPUzFCUzBWVWN6ZDFURlZEYTBWck9HWmFiblZ0YnpWcFpIZDFjSG90Y2pNdE56SndWbkZOTW5SdmJIUm1NbWM9In19fQ==
kind: Secret
metadata:
name: jenkins-docker-login
namespace: jx
type: Opaque
-
open jenkins to config kubernetes plugin to use new secret
jenkins-docker-login
formaven
node -
import your project by
jx import --url=<YOUR GIT URL>