Skip to content

Commit 9fb7da3

Browse files
authored
Merge pull request #819 from cambridge-cares/1579-dev-stackerise-cea-agent
1579 dev stackerise cea agent
2 parents bc3a610 + 8c2d8c0 commit 9fb7da3

File tree

17 files changed

+555
-327
lines changed

17 files changed

+555
-327
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
8+
{
9+
"type": "java",
10+
"name": "Debug",
11+
"request": "attach",
12+
"hostName": "localhost",
13+
"port": "5005",
14+
"preLaunchTask": "compose-deploy",
15+
"projectName": "${workspaceFolderBasename}"
16+
},
17+
{
18+
"type": "java",
19+
"name": "Build and Debug",
20+
"request": "attach",
21+
"hostName": "localhost",
22+
"port": "5005",
23+
"preLaunchTask": "compose-build-deploy",
24+
"projectName": "${workspaceFolderBasename}"
25+
},
26+
{
27+
"type": "java",
28+
"name": "Reattach and Debug",
29+
"request": "attach",
30+
"hostName": "localhost",
31+
"port": "5005",
32+
"projectName": "${workspaceFolderBasename}"
33+
}
34+
],
35+
"inputs": [
36+
{
37+
"id": "debug.port",
38+
"type": "command",
39+
// Get the next avaliable debug port and write it to the cache file
40+
"command": "shellCommand.execute",
41+
"args": {
42+
"command": "bash ./stack.sh ports write",
43+
"useFirstResult": true
44+
}
45+
},
46+
{
47+
"id": "debug.port.read",
48+
"type": "command",
49+
// Get the last debug port from the cache file
50+
"command": "shellCommand.execute",
51+
"args": {
52+
"command": "bash ./stack.sh ports read",
53+
"useFirstResult": true
54+
}
55+
}
56+
]
57+
}

Agents/CEAAgent/.vscode/tasks.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "shell",
8+
"label": "compose-build",
9+
"command": "bash",
10+
"args": [
11+
"-c",
12+
"./stack.sh build"
13+
],
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
},
19+
{
20+
"type": "shell",
21+
"label": "compose-deploy-internal",
22+
"command": "./stack.sh",
23+
"args": [
24+
"start",
25+
"${input:stackName}",
26+
"--debug-port",
27+
"${input:debug.port}"
28+
],
29+
"options": {
30+
"shell": {
31+
"executable": "bash"
32+
}
33+
}
34+
},
35+
{
36+
"type": "shell",
37+
"label": "compose-deploy",
38+
"command": "sleep 1",
39+
"dependsOn": [
40+
"compose-deploy-internal"
41+
],
42+
"windows": {
43+
"options": {
44+
"shell": {
45+
"executable": "powershell"
46+
}
47+
}
48+
}
49+
},
50+
{
51+
"type": "shell",
52+
"label": "compose-build-deploy",
53+
"dependsOn": [
54+
"compose-build",
55+
"compose-deploy"
56+
],
57+
"dependsOrder": "sequence"
58+
}
59+
],
60+
"inputs": [
61+
{
62+
"id": "stackName",
63+
"type": "promptString",
64+
"description": "Name your stack.",
65+
"default": "TEST-STACK"
66+
},
67+
{
68+
"id": "debug.port",
69+
"type": "command",
70+
// Get the last debug port from the cache file
71+
"command": "shellCommand.execute",
72+
"args": {
73+
"command": "bash ./stack.sh ports read",
74+
"useFirstResult": true
75+
}
76+
}
77+
]
78+
}

Agents/CEAAgent/Dockerfile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ WORKDIR /root/.m2
1717
RUN sed -i "s|MASTER_PASSWORD|$(mvn --encrypt-master-password master_password)|" settings-security.xml
1818
RUN sed -i "s|REPO_USERNAME|$(cat ../credentials/repo_username.txt)|;s|REPO_PASSWORD|$(cat ../credentials/repo_password.txt|xargs mvn --encrypt-password)|" settings.xml
1919

20-
# Set username and password from credentials
21-
WORKDIR /root/cea-agent/src/main/resources
22-
RUN sed -i "s|USERNAME|$(cat ../../../../credentials/postgres_username.txt)|;s|PASSWORD|$(cat ../../../../credentials/postgres_password.txt)|" timeseriesclient.properties
23-
RUN sed -i "s|USERNAME|$(cat ../../../../credentials/postgis_username.txt)|;s|PASSWORD|$(cat ../../../../credentials/postgis_password.txt)|" postgis.properties
24-
2520
# Build
2621
WORKDIR /root/cea-agent
2722
RUN mvn package
@@ -53,5 +48,5 @@ ENV PATH "/venv/bin:/venv/cea/bin:/venv/Daysim:$PATH"
5348
SHELL ["/bin/bash", "-c"]
5449

5550
# Start the Tomcat server
56-
ENTRYPOINT ["java", "-cp", "target/cea-agent-0.3.1-jar-with-dependencies.jar" , "uk.ac.cam.cares.jps.agent.cea.Main"]
51+
ENTRYPOINT ["java", "-cp", "target/cea-agent-1.0.0-jar-with-dependencies.jar" , "uk.ac.cam.cares.jps.agent.cea.Main"]
5752
#==================================================================================================

0 commit comments

Comments
 (0)