Skip to content

Commit c537bcf

Browse files
raph-allegregitbook-bot
authored andcommitted
GitBook: [master] 2 pages modified
1 parent 52fe5f3 commit c537bcf

File tree

2 files changed

+172
-130
lines changed

2 files changed

+172
-130
lines changed

getting-started/getting-started-activiti-cloud/getting-started-activiti-cloud-jx/amazon-eks-jx.md

+95-70
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,30 @@ All of the persistence volume claims of Activiti Cloud infrastructure and applic
1818

1919
In case, you know what you are doing, get Jx from [https://jenkins-x.io/getting-started/install/](https://jenkins-x.io/getting-started/install/) and then follow the short version:
2020

21-
```text
21+
```bash
2222
export AWS_ACCESS_KEY_ID=1234567890
2323
export AWS_SECRET_ACCESS_KEY=123456789
2424
export CLUSTER_NAME=activiti-cloud
2525

26-
$ jx upgrade cli
26+
jx upgrade cli
27+
```
2728

28-
$ jx create cluster eks \
29-
--cluster-name=$CLUSTER_NAME \
30-
--skip-installation=true \
31-
--node-type='m5.xlarge' \
32-
--nodes=3
29+
```bash
30+
jx create cluster eks \
31+
--cluster-name=$CLUSTER_NAME \
32+
--skip-installation=true \
33+
--node-type='m5.xlarge' \
34+
--nodes=2 \
35+
--advanced-mode
36+
```
3337

34-
$ jx install \
35-
--provider=eks \
36-
--no-default-environments
38+
```bash
39+
jx install \
40+
--provider=eks \
41+
--no-default-environments \
42+
--static-jenkins \
43+
--no-tiller=false \
44+
--advanced-mode
3745
```
3846

3947
Then, skip to _Let’s Deploy Activiti Cloud in EKS_ section at the end of this document.
@@ -71,7 +79,7 @@ After successful installation of jx client you should now be able to display the
7179
```text
7280
$ jx version
7381
NAME VERSION
74-
Jx 1.3.836
82+
Jx 2.0.323
7583
```
7684

7785
#### Upgrade Warning for jx
@@ -80,18 +88,12 @@ jx version is aggressive about upgrading, so much so that the version command pr
8088

8189
```text
8290
~ $ jx version
83-
Failed to find helm installs: failed to run 'helm list' command in directory '', output: 'Error: Get https://localhost:6443/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp [::1]:6443: connect: connection refused': exit status 1
84-
Failed to get kubernetes server version: Get https://localhost:6443/version?timeout=32s: dial tcp [::1]:6443: connect: connection refused
85-
Failed to get kubectl version: Command failed 'kubectl version --short': Client Version: v1.13.2
86-
The connection to the server localhost:6443 was refused - did you specify the right host or port? exit status 1
8791
88-
Failed to get helm version: failed to run 'helm version --short' command in directory '', output: 'Client: v2.12.2+g7d2b0c7
89-
Error: Get https://localhost:6443/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp [::1]:6443: connect: connection refused': exit status 1
9092
NAME VERSION
91-
jx 1.3.126
93+
jx 2.0.232
9294
git git version 2.17.2 (Apple Git-113)
9395
94-
A new jx version is available: 1.3.769
96+
A new jx version is available: 2.0.333
9597
? Would you like to upgrade to the new jx version? No
9698
```
9799

@@ -127,15 +129,16 @@ Let’s create the new Kubernetes cluster with EKS using the following command:
127129

128130
Note: Jx cli simply wraps eksctl cli to create cluster using Aws api. You may choose to create cluster manually based on your requirements using eksctl command, if you know what you are doing.
129131

130-
```text
131-
$ jx create cluster eks \
132-
--cluster-name=$CLUSTER_NAME \
133-
--skip-installation=true \
134-
--node-type='m5.xlarge' \
135-
--nodes=3
132+
```bash
133+
jx create cluster eks \
134+
--cluster-name=$CLUSTER_NAME \
135+
--skip-installation=true \
136+
--node-type='m5.xlarge' \
137+
--nodes=2 \
138+
--advanced-mode
136139
```
137140

138-
This will provision activiti-cloud EKS cluster with 3 nodes of type m5.xlarge \(4CPU’s, 16GB RAM\)
141+
This will provision activiti-cloud EKS cluster with 2 nodes of type m5.xlarge \(4CPU’s, 16GB RAM\)
139142

140143
![](../../../.gitbook/assets/jx-create-cluster-eks.png)
141144

@@ -160,10 +163,13 @@ Now that we have the EKS cluster up and running, we can install the Jenkins X pl
160163

161164
The Jenkins X platform can be installed using the following command without installing default environments repos. We will create Activiti Cloud Environments GitOps repos later.
162165

163-
```text
164-
$ jx install \
165-
--provider=eks \
166-
--no-default-environments
166+
```bash
167+
jx install \
168+
--provider=eks \
169+
--no-default-environments \
170+
--static-jenkins \
171+
--no-tiller=false \
172+
--advanced-mode
167173
```
168174

169175
Notes: To setup and use other than Github Git provider see: [https://jenkins-x.io/developing/git/](https://jenkins-x.io/developing/git/)
@@ -200,14 +206,14 @@ The URL to access Jenkins will printed in the output of the console together wit
200206

201207
Note: after you have installed Jenkins-X, you may want to configure Jenkins-X to make all new repositories private by default with the following command:
202208

203-
```text
204-
$ jx edit gitprivate
209+
```bash
210+
jx edit gitprivate
205211
```
206212

207213
To open Jenkins UI in the browser, run the following command::
208214

209-
```text
210-
$ jx console
215+
```bash
216+
jx console
211217
```
212218

213219
![](../../../.gitbook/assets/jenkins-console-login.png)
@@ -228,37 +234,49 @@ We will now proceed to provision two GitOps environments for deploying Activiti
228234

229235
Set the following environment variables:
230236

231-
```text
232-
$ export CLUSTER_DOMAIN=$(kubectl get cm ingress-config -o=go-template --template='{{.data.domain}}' -n jx) && echo $CLUSTER_DOMAIN
233-
234-
$ export ENV_PREFIX=$CLUSTER_NAME && echo $ENV_PREFIX
237+
```bash
238+
export CLUSTER_DOMAIN=$(kubectl get cm ingress-config -o=go-template --template='{{.data.domain}}' -n jx) && echo $CLUSTER_DOMAIN
239+
export ENV_PREFIX=$CLUSTER_NAME && echo $ENV_PREFIX
235240
```
236241

237242
### Create Activiti Cloud DevOps Environments
238243

239244
Run this command to configure environments using domain name of the cluster with the Activiti Cloud Environment Git repository used as the fork when creating new GitOps environment Git repo and custom environment repo prefix. Your Environment Git repo will be of the form 'environment-$prefix-$envName'
240245

241-
```text
242-
$ jx create env --domain $CLUSTER_DOMAIN \
243-
--fork-git-repo='https://github.com/activiti/activiti-cloud-environments.git' \
246+
```bash
247+
export ENV_REPO=https://github.com/activiti/activiti-cloud-environments.git
248+
```
249+
250+
Select default options when running following commands to create Activiti Cloud Platform GitOps environments;
251+
252+
```bash
253+
jx create env --domain $CLUSTER_DOMAIN \
254+
--fork-git-repo=$ENV_REPO \
244255
--prefix=$ENV_PREFIX \
245256
--name=staging \
246257
--namespace=staging \
247258
--git-private=true \
248-
--promotion=Auto
249-
$ jx create env --domain $CLUSTER_DOMAIN \
250-
--fork-git-repo='https://github.com/activiti/activiti-cloud-environments.git' \
259+
--label=Staging \
260+
--promotion=Auto \
261+
--batch-mode
262+
```
263+
264+
```bash
265+
jx create env --domain $CLUSTER_DOMAIN \
266+
--fork-git-repo=$ENV_REPO \
251267
--prefix=$ENV_PREFIX \
252268
--name=production \
253269
--namespace=production \
254270
--git-private=true \
255-
--promotion=Manual
271+
--label=Production \
272+
--promotion=Manual \
273+
--batch-mode
256274
```
257275

258276
After Jx created new environments, run `jx console` command to open Jenkins UI, you can confirm that Jenkins X has successfully provisioned two environments for us: a staging environment and a production environment:
259277

260-
```text
261-
$ jx console
278+
```bash
279+
jx console
262280
```
263281

264282
![](../../../.gitbook/assets/jenkins-ui-env-pipelines.png)
@@ -294,42 +312,45 @@ We will need to create Activiti Jx Quickstart Location to use Activiti Quickstar
294312

295313
Run this command to add Activiti Quickstart location for your team:
296314

297-
```text
298-
$ jx create quickstartlocation --owner activiti
315+
```bash
316+
jx create quickstartlocation --owner activiti
299317
```
300318

301319
To get the list of registered quickstart locations run command:
302320

303-
```text
304-
$ jx get quickstartlocations
321+
```bash
322+
jx get quickstartlocations
323+
```
324+
325+
```bash
305326
GIT SERVER KIND OWNER INCLUDES EXCLUDES
306327
https://github.com github jenkins-x-quickstarts * WIP-*
307-
https://github.com github activiti * WIP-*
328+
https://github.com github activiti
308329
```
309330

310331
#### Setup Activiti Cloud Platform in your Git repository
311332

312333
Simply run the following command to create your first Activiti Cloud platform Git repository:
313334

314-
```text
315-
$ jx create quickstart --owner activiti \
335+
```bash
336+
jx create quickstart --owner activiti \
316337
--filter activiti-cloud-platform-quickstart \
317-
--project-name=activiti-cloud-platform \
338+
--project-name=activiti-cloud-application \
318339
--batch-mode
319340
```
320341

321342
In terminal run Jx commands to monitor the deployment progress:
322343

323344
```text
324-
$ jx get activity -w
325-
$ jx get pipelines
326-
$ jx console
345+
jx get activity -w
346+
jx get pipelines
347+
jx console
327348
```
328349

329350
Then, after ~4-5 minutes you should see your Activiti Cloud Platform deployed into staging environment:
330351

331-
```text
332-
$ kubectl get pods -w -n staging
352+
```bash
353+
watch kubectl get pods -n staging
333354
```
334355

335356
![](../../../.gitbook/assets/kubectl-get-pods-staging-platform.png)
@@ -340,28 +361,28 @@ $ kubectl get pods -w -n staging
340361

341362
Run the following command to create your first connector project Git repository:
342363

343-
```text
344-
$ jx create quickstart --owner activiti \
364+
```bash
365+
jx create quickstart --owner activiti \
345366
--filter activiti-cloud-connector-quickstart \
346-
--project-name=activiti-rb-connector \
367+
--project-name=activiti-my-connector \
347368
--batch-mode
348369
```
349370

350371
#### Setup Activiti Cloud Runtime Bundle in your Git repository
351372

352373
Run the following command to create your first runtime bundle project Git repository:
353374

354-
```text
355-
$ jx create quickstart --owner activiti \
375+
```bash
376+
jx create quickstart --owner activiti \
356377
--filter activiti-cloud-runtime-bundle-quickstart \
357-
--project-name=activiti-rb-app \
378+
--project-name=activiti-my-rb \
358379
--batch-mode
359380
```
360381

361382
Then, after ~4-5 minutes you should see your Connector and Runtime Bundle deployed into staging environment:
362383

363-
```text
364-
$ kubectl get pods -w -n staging
384+
```bash
385+
watch kubectl get pods -n staging
365386
```
366387

367388
![](../../../.gitbook/assets/kubectl-get-pods-staging-runtime.png)
@@ -372,9 +393,13 @@ $ kubectl get pods -w -n staging
372393

373394
#### Open Activiti Cloud Modeler
374395

375-
[http://activiti-cloud-gateway.jx-staging.1,2,3,4.nip.io/activiti-cloud-modeling](http://activiti-cloud-gateway.jx-staging.1,2,3,4.nip.io/activiti-cloud-modeling).
396+
[http://gateway.staging.1.2.3.4.nip.io/modeling](http://activiti-cloud-gateway.jx-staging.1,2,3,4.nip.io/activiti-cloud-modeling)
397+
398+
Here instead of 1.2.3.4.nip.io use the earlier $CLUSTER\_DOMAIN environment variable, i.e.
376399

377-
Here instead of 1,2,3,4.nip.io use the earlier CLUSTER\_DOMAIN=$\(kubectl get cm ingress-config -o=go-template --template=''
400+
```bash
401+
echo gateway.$CLUSTER_DOMAIN/modeling
402+
```
378403

379404
Login into using credentials: modeler/password
380405

0 commit comments

Comments
 (0)