Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
demo-infra-jenkins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
demo
demo-infra-jenkins
Commits
99e921f4
Commit
99e921f4
authored
Apr 15, 2020
by
João Lino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add install and uninstall scripts to make operation straightforward.
parent
9b521c36
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
demo-infra-jenkins-install.sh
demo-infra-jenkins-install.sh
+28
-0
demo-infra-jenkins-uninstall.sh
demo-infra-jenkins-uninstall.sh
+4
-0
No files found.
demo-infra-jenkins-install.sh
0 → 100644
View file @
99e921f4
#!/bin/sh
__is_pod_ready
()
{
POD_STATUS
=
"False"
while
[
"
$POD_STATUS
"
!=
"True"
]
;
do
echo
"waiting for pod..."
sleep
5
POD_STATUS
=
$(
kubectl get pods
--namespace
demo-infra
-l
"app.kubernetes.io/component=jenkins-master"
-l
"app.kubernetes.io/instance=demo-infra-jenkins"
-o
jsonpath
=
'{..status.conditions[?(@.type=="Ready")].status}'
)
done
}
# install jenkins
helm
install
--namespace
demo-infra
--kubeconfig
~/.kube/config demo-infra-jenkins stable/jenkins
# wait for it to become ready
__is_pod_ready
# print admin password
export
JENKINS_PASS
=
$(
kubectl get secret
--namespace
demo-infra demo-infra-jenkins
-o
jsonpath
=
"{.data.jenkins-admin-password}"
|
base64
--decode
)
echo
"HOST: http://192.168.1.194:8180 USERNAME: admin PASSWORD:
$JENKINS_PASS
"
# expose
export
POD_NAME
=
$(
kubectl get pods
--namespace
demo-infra
-l
"app.kubernetes.io/component=jenkins-master"
-l
"app.kubernetes.io/instance=demo-infra-jenkins"
-o
jsonpath
=
"{.items[0].metadata.name}"
)
kubectl
--namespace
demo-infra port-forward
$POD_NAME
8180:8080
--address
0.0.0.0 &
#helm uninstall --namespace demo-infra --kubeconfig ~/.kube/config demo-infra-jenkins
demo-infra-jenkins-uninstall.sh
0 → 100644
View file @
99e921f4
#!/bin/sh
# use helm for uninstall
helm uninstall
--namespace
demo-infra
--kubeconfig
~/.kube/config demo-infra-jenkins
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment