Skip to content

Commit b17d422

Browse files
voxparcxlsjamesfwoodJames Wood
authored
this branch is from main. with updated actions (#218)
Co-authored-by: James Wood <[email protected]> Co-authored-by: James Wood <[email protected]>
1 parent ac88d72 commit b17d422

File tree

6 files changed

+81
-49
lines changed

6 files changed

+81
-49
lines changed

.github/workflows/camunda.yml

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
WORKERS: 1
2121

2222
services:
23-
mdb103:
23+
mdb106:
2424
image: mariadb:10.6
2525
ports:
2626
- 3306:3306
2727
env:
2828
MYSQL_DATABASE: cws_dev
2929
MYSQL_ROOT_PASSWORD: adminpw
3030
options: >-
31-
--name mdb103
31+
--name mdb106
3232
3333
steps:
3434
- uses: actions/checkout@v4
@@ -38,7 +38,14 @@ jobs:
3838
with:
3939
java-version: '17'
4040
distribution: 'temurin'
41-
cache: maven
41+
42+
- name: Cache Maven packages
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.m2/repository
46+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
47+
restore-keys: |
48+
${{ runner.os }}-m2-
4249
4350
- name: Create open-source certs
4451
run: |
@@ -54,11 +61,8 @@ jobs:
5461
chmod 600 ~/.cws/creds
5562
5663
- name: Download Logstash
57-
uses: carlosperate/download-file-action@v2
58-
with:
59-
file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
60-
file-name: logstash-8.12.0.zip
61-
location: install/logging/
64+
run: |
65+
curl -o install/logging/logstash-8.12.0.zip https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
6266
6367
- name: Check for Logstash
6468
run: |
@@ -90,8 +94,8 @@ jobs:
9094
9195
- name: Set up Google Chrome
9296
run: |
93-
sudo apt-get update
94-
sudo apt-get --only-upgrade install google-chrome-stable
97+
sudo apt update
98+
sudo apt install -y google-chrome-stable
9599
96100
- name: Display Google Chrome version
97101
run: google-chrome --version
@@ -150,15 +154,15 @@ jobs:
150154
WORKERS: 2
151155

152156
services:
153-
mdb103:
157+
mdb106:
154158
image: mariadb:10.6
155159
ports:
156160
- 3306:3306
157161
env:
158162
MYSQL_DATABASE: cws_dev
159163
MYSQL_ROOT_PASSWORD: adminpw
160164
options: >-
161-
--name mdb103
165+
--name mdb106
162166
163167
steps:
164168
- uses: actions/checkout@v4
@@ -168,7 +172,14 @@ jobs:
168172
with:
169173
java-version: '17'
170174
distribution: 'temurin'
171-
cache: maven
175+
176+
- name: Cache Maven packages
177+
uses: actions/cache@v4
178+
with:
179+
path: ~/.m2/repository
180+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
181+
restore-keys: |
182+
${{ runner.os }}-m2-
172183
173184
- name: Create open-source certs
174185
run: |
@@ -184,11 +195,8 @@ jobs:
184195
chmod 600 ~/.cws/creds
185196
186197
- name: Download Logstash
187-
uses: carlosperate/download-file-action@v2
188-
with:
189-
file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
190-
file-name: logstash-8.12.0.zip
191-
location: install/logging/
198+
run: |
199+
curl -o install/logging/logstash-8.12.0.zip https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
192200
193201
- name: Check for Logstash
194202
run: |
@@ -220,8 +228,8 @@ jobs:
220228
221229
- name: Set up Google Chrome
222230
run: |
223-
sudo apt-get update
224-
sudo apt-get --only-upgrade install google-chrome-stable
231+
sudo apt update
232+
sudo apt install -y google-chrome-stable
225233
226234
- name: Display Google Chrome version
227235
run: google-chrome --version
@@ -271,10 +279,10 @@ jobs:
271279
- name: Check out the repo
272280
uses: actions/checkout@v4
273281

274-
- name: Set up JDK 11
282+
- name: Set up JDK 17
275283
uses: actions/setup-java@v4
276284
with:
277-
java-version: '11'
285+
java-version: '17'
278286
distribution: 'temurin'
279287
cache: maven
280288

.github/workflows/ldap.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
WORKERS: 1
2121

2222
services:
23-
mdb103:
23+
mdb106:
2424
image: mariadb:10.6
2525
ports:
2626
- 3306:3306
2727
env:
2828
MYSQL_DATABASE: cws_dev
2929
MYSQL_ROOT_PASSWORD: adminpw
3030
options: >-
31-
--name mdb103
31+
--name mdb106
3232
3333
steps:
3434
- uses: actions/checkout@v4
@@ -38,7 +38,14 @@ jobs:
3838
with:
3939
java-version: '17'
4040
distribution: 'temurin'
41-
cache: maven
41+
42+
- name: Cache Maven packages
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.m2/repository
46+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
47+
restore-keys: |
48+
${{ runner.os }}-m2-
4249
4350
- name: Create open-source certs
4451
run: |
@@ -54,11 +61,8 @@ jobs:
5461
chmod 600 ~/.cws/creds
5562
5663
- name: Download Logstash
57-
uses: carlosperate/download-file-action@v2
58-
with:
59-
file-url: https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
60-
file-name: logstash-8.12.0.zip
61-
location: install/logging/
64+
run: |
65+
curl -o install/logging/logstash-8.12.0.zip https://artifacts.elastic.co/downloads/logstash/logstash-8.12.0-windows-x86_64.zip
6266
6367
- name: Check for Logstash
6468
run: |
@@ -94,9 +98,9 @@ jobs:
9498
ls -al
9599
96100
- name: Set up Google Chrome
97-
run: |
98-
sudo apt-get update
99-
sudo apt-get --only-upgrade install google-chrome-stable
101+
run: |
102+
sudo apt update
103+
sudo apt install -y google-chrome-stable
100104
101105
- name: Display Google Chrome version
102106
run: google-chrome --version

install/docker/console-db-es-ls-kibana/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Docker Setup
22

3-
### Quickly run common-workflow-service on a single machine with all required services running on the same machine.
3+
### Quickly run common-workflow-service on a single machine with all required services running on the same machine.
44

55
#### It will deploy the following services in Docker:
66
- db (MariaDb)
@@ -14,10 +14,11 @@
1414
2. Build `common-workflow-service` Docker Image using the `build.sh` script in the cws-image dir
1515
1. Update the version in the `build.sh` script if necessary
1616
3. Update the `config.properties` and `docker-compose.yml` accordingly.
17-
4. Run the command `docker network create cws-network` to create a shared network space for other workers to join
17+
4. Create a creds file on your machine in path `~/.cws/creds` and set the file permission with `chmod 700 ~/.cws/creds`
18+
5. Run the command `docker network create cws-network` to create a shared network space for other workers to join
1819

1920
To run use the command:
20-
21+
2122
docker-compose up
2223

2324
## Adding more workers
@@ -31,4 +32,4 @@ To run use the command:
3132
3. If you want to add even more workers you'll need to do the following:
3233
1. Copy the `worker-ls` directory to a new location
3334
2. Modify those `config.properites` and `docker-compose.yml` accordingly.
34-
3. Run `docker-compose up` in each new worker directory
35+
3. Run `docker-compose up` in each new worker directory

install/docker/console-db-es-ls-kibana/config.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# ---------------------------------------------------------------------------
22
# This is an example properties file that can be used when configuring CWS
33
# for the first time.
4-
#
4+
#
55
# To use:
66
#
77
# 1) Fill in the correct values where you see [YourXXX] below, for example
88
# [YourHostname].
99
# The hard-coded values are suggested to be used, but can be changed if
1010
# desired.
11-
#
11+
#
1212
# 2) Run CWS configuration program with this properties file:
1313
# ./configure.sh config.properties
1414
#
@@ -50,8 +50,8 @@ database_password=test
5050
# The LDAP username for the user that will be the CWS Administrator.
5151
# This User will have the initial permissions in CWS, and will have the ability
5252
# to add users and modify permissions.
53-
admin_user=cws
54-
53+
admin_user=cwsci
54+
5555
# The first and last name, and email address of the CWS Administrator.
5656
# These fields are only required if using CAMUNDA security
5757
admin_firstname=CWS
@@ -79,7 +79,7 @@ amq_port=31616
7979
cws_amq_jmx_port=37099
8080
cws_jmx_port=31099
8181
identity_plugin_type=CAMUNDA
82-
cws_ldap_url=ldaps://ldap.localhost:636
82+
cws_ldap_url=ldap://ldapsearch:389
8383
notify_users_email=y
8484
email_subject=[CWS] You have been assigned a task (CWS_TASK_NAME)
8585
email_body=fn:CWS_USER_FIRSTNAME<br/>ln:CWS_USER_LASTNAME,<br/>tn:(CWS_TASK_NAME), em:CWS_USER_EMAIL

install/docker/console-db-es-ls-kibana/docker-compose.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ services:
1717
interval: 3s
1818
timeout: 1s
1919
retries: 5
20+
networks:
21+
- external-network
2022
es:
2123
labels:
2224
com.example.service: "es"
@@ -32,6 +34,8 @@ services:
3234
- cluster.name=docker-cluster
3335
- xpack.security.enabled=false
3436
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
37+
networks:
38+
- external-network
3539
healthcheck:
3640
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
3741
interval: 5s
@@ -93,6 +97,7 @@ services:
9397
depends_on:
9498
- db
9599
- es
100+
- ldapsearch
96101
# - logstash
97102
# - kibana
98103
ports:
@@ -116,6 +121,8 @@ services:
116121
- ./config.properties:/home/cws_user/config.properties:ro
117122
- ~/.cws/creds:/root/.cws/creds:ro
118123
- console-logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.75/logs
124+
networks:
125+
- external-network
119126
cws-worker:
120127
container_name: cws-worker1
121128
labels:
@@ -126,6 +133,7 @@ services:
126133
- db
127134
- es
128135
- cws
136+
- ldapsearch
129137
hostname: cws-worker1
130138
environment:
131139
- DB_HOST=db
@@ -138,11 +146,22 @@ services:
138146
- ./worker-config.properties:/home/cws_user/config.properties:ro
139147
- ~/.cws/creds:/root/.cws/creds:ro
140148
- worker1-logs-volume:/home/cws_user/cws/server/apache-tomcat-9.0.75/logs
149+
networks:
150+
- external-network
151+
ldapsearch:
152+
container_name: ldapsearch_container
153+
image: ghcr.io/nasa-ammos/common-workflow-service/openldap:v2.6
154+
ports:
155+
- 389:389
156+
networks:
157+
- external-network
158+
141159

142160
volumes:
143161
console-logs-volume:
144162
worker1-logs-volume:
145163

146164
networks:
147-
cws-network:
148-
external: true
165+
external-network:
166+
external:
167+
name: cws-network

install/docker/console-db-es-ls-kibana/worker-config.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# ---------------------------------------------------------------------------
22
# This is an example properties file that can be used when configuring CWS
33
# for the first time.
4-
#
4+
#
55
# To use:
66
#
77
# 1) Fill in the correct values where you see [YourXXX] below, for example
88
# [YourHostname].
99
# The hard-coded values are suggested to be used, but can be changed if
1010
# desired.
11-
#
11+
#
1212
# 2) Run CWS configuration program with this properties file:
1313
# ./configure.sh config.properties
1414
#
@@ -50,8 +50,8 @@ database_password=test
5050
# The LDAP username for the user that will be the CWS Administrator.
5151
# This User will have the initial permissions in CWS, and will have the ability
5252
# to add users and modify permissions.
53-
admin_user=cws
54-
53+
admin_user=cwsci
54+
5555
# The first and last name, and email address of the CWS Administrator.
5656
# These fields are only required if using CAMUNDA security
5757
admin_firstname=CWS
@@ -78,7 +78,7 @@ amq_port=31616
7878

7979
cws_jmx_port=31096
8080
identity_plugin_type=CAMUNDA
81-
cws_ldap_url=ldaps://ldap.localhost:636
81+
cws_ldap_url=ldap://ldapsearch:389
8282
notify_users_email=y
8383
email_subject=[CWS] You have been assigned a task (CWS_TASK_NAME)
8484
email_body=fn:CWS_USER_FIRSTNAME<br/>ln:CWS_USER_LASTNAME,<br/>tn:(CWS_TASK_NAME), em:CWS_USER_EMAIL

0 commit comments

Comments
 (0)