Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 8ab9398

Browse files
Merge branch 'master' into volume
2 parents bde28be + 81b3be5 commit 8ab9398

File tree

11 files changed

+43
-71
lines changed

11 files changed

+43
-71
lines changed

‎.travis.yml‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ python: 2.7
44
cache: pip
55
sudo: required
66

7+
dist: trusty
8+
9+
notifications:
10+
slack:
11+
rooms:
12+
- "$SLACK_ROOM"
13+
on_pull_requests: false
14+
on_success: change
15+
716
services:
817
- docker
918

10-
addons:
11-
apt:
12-
sources:
13-
- debian-sid
14-
packages:
15-
- shellcheck
16-
1719
matrix:
1820
fast_finish: true
1921

@@ -23,6 +25,9 @@ env:
2325
- TEST_RUN="./tests/test-kubernetes.sh"
2426

2527
before_install:
28+
- curl -sSL "https://ftp-master.debian.org/keys/archive-key-7.0.asc" | sudo -E apt-key add -
29+
- echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" | sudo tee -a /etc/apt/sources.list > /dev/null
30+
- sudo apt-get install shellcheck=0.3.3-1~ubuntu14.04.1
2631
- pip install -U -r test-requirements.txt
2732

2833
install:

‎MAINTAINERS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ more Code Pattern repositories.
66
## Methodology
77

88
This repository does not have a traditional release management cycle, but
9-
should instead be maintained as as a useful, working, and polished reference at
9+
should instead be maintained as a useful, working, and polished reference at
1010
all times. While all work can therefore be focused on the master branch, the
1111
quality of this branch should never be compromised.
1212

‎README.md‎

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Create a Kubernetes cluster with either [Minikube](https://kubernetes.io/docs/ge
5252
If you want to use the Bluemix Container Registry start by [Uploading the images](docs/use-bluemix-container-registry.md) to the Bluemix Container Registry.
5353

5454
### Deploy using DevOps Toolchain to Kubernetes Cluster from Bluemix Container Service
55-
If you want to deploy the Gitlab directly to Bluemix, click on 'Deploy to Bluemix' button below to create a [Bluemix DevOps service toolchain and pipeline](https://console.ng.bluemix.net/docs/services/ContinuousDelivery/toolchains_about.html#toolchains_about) for deploying the Gitlab sample, else jump to [Steps](#steps)
55+
If you want to deploy the Gitlab directly to Bluemix, click on `Deploy to Bluemix` button below to create a [Bluemix DevOps service toolchain and pipeline](https://console.ng.bluemix.net/docs/services/ContinuousDelivery/toolchains_about.html#toolchains_about) for deploying the Gitlab sample, else jump to [Steps](#steps)
5656

5757
[![Create Toolchain](https://github.com/IBM/container-journey-template/blob/master/images/button.png)](https://console.ng.bluemix.net/devops/setup/deploy/)
5858

@@ -89,15 +89,15 @@ $ kubectl create -f kubernetes/redis.yaml
8989
$ kubectl create -f kubernetes/gitlab.yaml
9090
```
9191

92-
After you have created all the services and deployments, wait for 3 to 5 minutes. You can check the status of your deployment on Kubernetes UI. Run 'kubectl proxy' and go to URL 'http://127.0.0.1:8001/ui' to check when the GitLab container becomes ready.
92+
After you have created all the services and deployments, wait for 3 to 5 minutes. You can check the status of your deployment on Kubernetes UI. Run `kubectl proxy` and go to URL 'http://127.0.0.1:8001/ui' to check when the GitLab container becomes ready.
9393

9494
![Kubernetes Status Page](images/kube_ui.png)
9595

9696
Next [retrieve your external ip and port for GitLab](#2-retrieve-external-ip-and-port-for-GitLab)
9797

9898
##### 1.2 Use PostgreSQL from Bluemix
9999

100-
Use the Bluemix catalog or the bx command to create a service instance of Compose for PostgreSQL and add a set of credentials.
100+
Use the Bluemix catalog or the `bx` command to create a service instance of Compose for PostgreSQL and add a set of credentials.
101101

102102
```bash
103103
$ bx service create compose-for-postgresql Standard "Compose for PostgreSQL-GL"
@@ -112,7 +112,7 @@ $ bx service key-show "Compose for PostgreSQL-GL" "Credentials-1" | grep "postgr
112112

113113
![Postgres Connection String example](images/pg_credentials.png)
114114

115-
Modify your ```kubernetes/gitlab-postgres-svc.yaml``` file and replace COMPOSE_PG_PASSWORD with the password, COMPOSE_PG_HOST with the hostname, and COMPOSE_PG_PORT with the port.
115+
Modify your ```kubernetes/gitlab-postgres-svc.yaml``` file and replace `COMPOSE_PG_PASSWORD` with the password, `COMPOSE_PG_HOST` with the hostname, and `COMPOSE_PG_PORT` with the port.
116116

117117
Using the above example, the ```env:``` section will look like this.
118118

@@ -145,7 +145,7 @@ $ kubectl create -f kubernetes/redis.yaml
145145
$ kubectl create -f kubernetes/gitlab-postgres-svc.yaml
146146
```
147147

148-
After you have created all the services and deployments, wait for 3 to 5 minutes. You can check the status of your deployment on Kubernetes UI. Run 'kubectl proxy' and go to URL 'http://127.0.0.1:8001/ui' to check when the GitLab container becomes ready.
148+
After you have created all the services and deployments, wait for 3 to 5 minutes. You can check the status of your deployment on Kubernetes UI. Run `kubectl proxy` and go to URL 'http://127.0.0.1:8001/ui' to check when the GitLab container becomes ready.
149149

150150
![Kubernetes Status Page](images/kube_ui_gr.png)
151151

@@ -163,9 +163,9 @@ NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
163163
gitlab 10.10.10.148 <nodes> 80:30080/TCP,22:30022/TCP 2s
164164
```
165165

166-
> Note: The 30080 port is for gitlab UI and the 30022 port is for ssh.
166+
> Note: The `30080` port is for gitlab UI and the `30022` port is for ssh.
167167

168-
> Note: The gitlab external url is set to `gitlab.example.com` add this to your hosts file pointing to your IP address from above in order to use the url that gitlab expects. If you can't do this, then using the IP (in this example 169.47.241.22) should work.
168+
> Note: The gitlab external url is set to `gitlab.example.com` add this to your hosts file pointing to your IP address from above in order to use the url that gitlab expects. If you can't do this, then using the IP (in this example `169.47.241.22`) should work.
169169

170170
> Note: If you using Minikube for local kubernetes deployment, you can access the list of service IPs using the `minikube service list` command.
171171

@@ -204,23 +204,6 @@ bx service key-delete "Compose for PostgreSQL-GL" Credentials-1
204204
bx service delete "Compose for PostgreSQL-GL"
205205
```
206206

207-
# Privacy Notice
208-
209-
Sample Kubernetes Yaml file that includes this package may be configured to track deployments to [IBM Cloud](https://www.bluemix.net/) and other Kubernetes platforms. The following information is sent to a [Deployment Tracker](https://github.com/IBM/metrics-collector-service) service on each deployment:
210-
211-
* Kubernetes Cluster Provider(`IBM Cloud,Minikube,etc`)
212-
* Kubernetes Machine ID
213-
* Kubernetes Cluster ID (Only from IBM Cloud's cluster)
214-
* Kubernetes Customer ID (Only from IBM Cloud's cluster)
215-
* Environment variables in this Kubernetes Job.
216-
217-
This data is collected from the Kubernetes Job in the sample application's yaml file. This data is used by IBM to track metrics around deployments of sample applications to IBM Cloud to measure the usefulness of our examples so that we can continuously improve the content we offer to you. Only deployments of sample applications that include code to ping the Deployment Tracker service will be tracked.
218-
219-
## Disabling Deployment Tracking
220-
221-
Please comment out/remove the Metric Kubernetes Job portion in the 'kubernetes/github.yaml' file.
222-
223-
224207
# License
225208
[Apache 2.0](LICENSE)
226209

‎docs/bluemix-postgres.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bx cr images
4040

4141
# 2. Create Compose for PostgreSQL on Bluemix
4242

43-
Use the Bluemix catalog or the bx command to create a service instance of Compose for PostgreSQL and add a set of credentials.
43+
Use the Bluemix catalog or the `bx` command to create a service instance of Compose for PostgreSQL and add a set of credentials.
4444

4545
```bash
4646
bx service create compose-for-postgresql Standard "Compose for PostgreSQL-GL"
@@ -87,9 +87,9 @@ kubectl create -f redis.yaml
8787
kubectl create -f gitlab-postgres-svc.yaml
8888
```
8989

90-
After you have created all the services and deployments, wait for 3 to 5 minutes. You can check the status of your deployment on Kubernetes UI. Run 'kubectl proxy' and go to URL 'http://127.0.0.1:8001/ui' to check when the GitLab container becomes ready.
90+
After you have created all the services and deployments, wait for 3 to 5 minutes. You can check the status of your deployment on Kubernetes UI. Run `kubectl proxy` and go to URL 'http://127.0.0.1:8001/ui' to check when the GitLab container becomes ready.
9191

92-
![Kubernetes Status Page](images/kube_ui_gr.png)
92+
![Kubernetes Status Page](/images/kube_ui_gr.png)
9393

9494
After few minutes run the following commands to get your public IP and NodePort number.
9595

@@ -102,22 +102,22 @@ NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
102102
gitlab 10.10.10.148 <nodes> 80:30080/TCP,22:30022/TCP 2s
103103
```
104104

105-
> Note: The 30080 port is for gitlab UI and the 30022 port is for ssh.
105+
> Note: The `30080` port is for gitlab UI and the `30022` port is for ssh.
106106
107107
Congratulation. Now you can use the link **http://[IP]:30080** to access your gitlab site on browser.
108108

109-
> Note: For the above example, the link would be http://169.47.241.106:30080 since its IP is 169.47.241.106 and the UI port number is 30080.
109+
> Note: For the above example, the link would be http://169.47.241.106:30080 since its IP is `169.47.241.106` and the UI port number is `30080`.
110110
111111

112112
# 5. Using GitLab
113113
Now that Gitlab is running you can register as a new user and create a project.
114114

115-
![Registration page](images/register.png)
115+
![Registration page](/images/register.png)
116116

117117

118118
After logging in as your newly-created user you can create a new project.
119119

120-
![Create project](images/new_project.png)
120+
![Create project](/images/new_project.png)
121121

122122
Once a project has been created you'll be asked to add an SSH key for your user.
123123

@@ -147,7 +147,7 @@ git push origin master
147147
```
148148

149149
You can now see it in the Gitlab UI.
150-
![Repo](images/first_commit.png)
150+
![Repo](/images/first_commit.png)
151151

152152
If you want to use http URLs for cloning and pushing to a public repository on GitLab, that`s enabled as well.
153153

‎docs/deploy-with-docker-on-linuxone.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ of which we will install GitLab.
1717
## Prerequisites
1818

1919
Register at [LinuxONE Communinity Cloud](https://developer.ibm.com/linuxone/) for a trial account.
20-
We will be using a Ret Hat base image for this journey, so be sure to chose the
21-
'Request your trial' button on the left side of this page.
20+
We will be using a Red Hat base image for this journey, so be sure to chose the
21+
`Request your trial` button on the left side of this page.
2222

2323
## Steps
2424

‎kubernetes/gitlab.yaml‎

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,8 @@ spec:
7474
name: gitlab
7575
volumeMounts:
7676
- name: gitlab
77-
mountPath: /home/git/data:rw
77+
mountPath: /home/git/data
7878
volumes:
7979
- name: gitlab
8080
persistentVolumeClaim:
8181
claimName: gitlab-claim
82-
---
83-
apiVersion: batch/v1
84-
kind: Job
85-
metadata: {name: kubernetes-containter-service-gitlab-sample-metrics}
86-
spec:
87-
template:
88-
metadata: {name: kubernetes-container-service-gitlab-sample-metrics}
89-
spec:
90-
containers:
91-
- env:
92-
- {name: config, value: '{"event_id": "web",
93-
"repository_id": "Kubernetes-container-service-Gitlab-sample",
94-
"target_services": ["Compose for PostgreSQL"],
95-
"target_runtimes": ["Kubernetes Cluster"],
96-
"event_organizer": "dev-journeys"}'}
97-
- {name: language, value: ''}
98-
image: journeycode/kubernetes:latest
99-
name: kubernetes-container-service-gitlab-sample-metrics
100-
resources:
101-
limits: {cpu: 100m}
102-
restartPolicy: Never

‎kubernetes/postgres.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ spec:
5555
name: postgresql
5656
volumeMounts:
5757
- name: postgresql
58-
mountPath: /var/lib/postgresql/data:rw
58+
mountPath: /var/lib/postgresql/data
5959
volumes:
6060
- name: postgresql
6161
persistentVolumeClaim:

‎kubernetes/redis.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ spec:
4949
name: redis
5050
volumeMounts:
5151
- name: redis
52-
mountPath: /data:rw
52+
mountPath: /data
5353
volumes:
5454
- name: redis
5555
persistentVolumeClaim:

‎scripts/install.sh‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ source "$(dirname "0ドル")"/../scripts/resources.sh
99
is_pull_request "0ドル"
1010

1111
echo "Install Bluemix CLI"
12-
curl -L https://public.dhe.ibm.com/cloud/bluemix/cli/bluemix-cli/latest/Bluemix_CLI_amd64.tar.gz > Bluemix_CLI.tar.gz
12+
curl -L https://public.dhe.ibm.com/cloud/bluemix/cli/bluemix-cli/latest/IBM_Cloud_CLI_amd64.tar.gz > Bluemix_CLI.tar.gz
1313
tar -xvf Bluemix_CLI.tar.gz
1414
sudo ./Bluemix_CLI/install_bluemix_cli
1515

@@ -18,6 +18,10 @@ curl -LO https://storage.googleapis.com/kubernetes-release/release/"$(curl -s ht
1818
chmod 0755 kubectl
1919
sudo mv kubectl /usr/local/bin
2020

21+
echo "Configuring bx to disable version check"
22+
bx config --check-version=false
23+
echo "Checking bx version"
24+
bx --version
2125
echo "Install the Bluemix container-service plugin"
2226
bx plugin install container-service -r Bluemix
2327

‎tests/test-kubeadm-dind-cluster.sh‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
source "$(dirname "0ドル")"/../scripts/resources.sh
55

66
setup_dind-cluster() {
7-
wget https://cdn.rawgit.com/Mirantis/kubeadm-dind-cluster/master/fixed/dind-cluster-v1.7.sh
8-
chmod 0755 dind-cluster-v1.7.sh
9-
./dind-cluster-v1.7.sh up
7+
wget https://cdn.rawgit.com/Mirantis/kubeadm-dind-cluster/master/fixed/dind-cluster-v1.8.sh
8+
chmod 0755 dind-cluster-v1.8.sh
9+
./dind-cluster-v1.8.sh up
1010
export PATH="$HOME/.kubeadm-dind-cluster:$PATH"
1111
}
1212

@@ -19,6 +19,7 @@ kubectl_deploy() {
1919
while [[ $(kubectl get pods | grep -c Running) -ne 3 ]]; do
2020
if [[ ! "$i" -lt 24 ]]; then
2121
echo "Timeout waiting on pods to be ready"
22+
kubectl get pods -a
2223
test_failed "0ドル"
2324
fi
2425
sleep 10

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /