Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 5f4a427

Browse files
kguilloux-ghKarineSBENIC
authored
Release/montee version 5.0.x et plugin jira (#4)
* Variabilisation du servername de squashtm. * Montée de version de 4.0.2 à 5.0.1 * ajout des plugins et du trustore Java des AC ANS * Mise en place d'un template qui récupère le fichier log4j sur Artifactory et le surcharge dans l'application (numéro sur Artifactory qui dépend de la version majeure de squashtm). --------- Co-authored-by: Karine <karine.guilloux.ext@sante.gouv.fr> Co-authored-by: SBENIC <selsebil.ibn-charrada.ext@esante.gouv.fr>
1 parent 5ef2685 commit 5f4a427

File tree

2 files changed

+161
-6
lines changed

2 files changed

+161
-6
lines changed

squashtm-app/forge-squashtm-premium.nomad.tpl

Lines changed: 103 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,44 @@ job "forge-squashtm-premium" {
2727

2828
task "squashtm" {
2929
driver = "docker"
30+
31+
artifact {
32+
source = "${repo_url}/artifactory/ext-tools/squash-tm/plugins/Jira_Cloud/${pluginjaxbapi}"
33+
options {
34+
archive = false
35+
}
36+
}
37+
38+
artifact {
39+
source = "${repo_url}/artifactory/ext-tools/squash-tm/plugins/Jira_Cloud/${pluginjaxbimpl}"
40+
options {
41+
archive = false
42+
}
43+
}
44+
45+
artifact {
46+
source = "${repo_url}/artifactory/ext-tools/squash-tm/plugins/Jira_Cloud/${pluginbugtrackerjiracloud}"
47+
options {
48+
archive = false
49+
}
50+
}
51+
52+
# Récupération du fichier log4j sur Artifactory
53+
artifact {
54+
source = "${repo_url}/artifactory/ext-tools/squash-tm/conf/5.0.x/log4j2.xml"
55+
options {
56+
archive = false
57+
}
58+
}
59+
60+
# Mise en place du trustore java avec les AC ANS
61+
artifact {
62+
source = "${repo_url}/artifactory/asip-ac/truststore/cacerts"
63+
options {
64+
archive = false
65+
}
66+
}
67+
3068
template {
3169
data = <<EOH
3270
SQTM_DB_TYPE=postgresql
@@ -51,6 +89,16 @@ EOH
5189
change_mode = "restart"
5290
}
5391

92+
# Ajout d'une configuration pour le proxy sortant
93+
template {
94+
data = <<EOH
95+
JAVA_TOOL_OPTIONS="-Djava.awt.headless=true -Dhttps.proxyHost=${url_proxy_sortant_https_host} -Dhttps.proxyPort=${url_proxy_sortant_https_port} -Dhttp.proxyHost=${url_proxy_sortant_http_host} -Dhttp.proxyPort=${url_proxy_sortant_http_port} -Dhttp.nonProxyHosts=${url_proxy_sortant_no_proxy}"
96+
EOH
97+
destination = "local/java.env"
98+
change_mode = "restart"
99+
env = true
100+
}
101+
54102
config {
55103
image = "${image}:${tag}"
56104
ports = ["http"]
@@ -64,16 +112,66 @@ EOH
64112
propagation = "rshared"
65113
}
66114
}
67-
}
68115

116+
# Fichier de configuration log4j2
117+
mount {
118+
type = "bind"
119+
target = "/opt/squash-tm/conf/log4j2.xml"
120+
source = "local/log4j2.xml"
121+
readonly = false
122+
bind_options {
123+
propagation = "rshared"
124+
}
125+
}
126+
127+
mount {
128+
type = "bind"
129+
target = "/opt/squash-tm/plugins/${pluginjaxbapi}"
130+
source = "local/${pluginjaxbapi}"
131+
readonly = true
132+
bind_options {
133+
propagation = "rshared"
134+
}
135+
}
136+
137+
mount {
138+
type = "bind"
139+
target = "/opt/squash-tm/plugins/${pluginjaxbimpl}"
140+
source = "local/${pluginjaxbimpl}"
141+
readonly = true
142+
bind_options {
143+
propagation = "rshared"
144+
}
145+
}
146+
147+
mount {
148+
type = "bind"
149+
target = "/opt/squash-tm/plugins/${pluginbugtrackerjiracloud}"
150+
source = "local/${pluginbugtrackerjiracloud}"
151+
readonly = true
152+
bind_options {
153+
propagation = "rshared"
154+
}
155+
}
156+
# Trustore java contenant les AC ANS
157+
mount {
158+
type = "bind"
159+
target = "/opt/java/openjdk/lib/security/cacerts"
160+
source = "local/cacerts"
161+
readonly = true
162+
bind_options {
163+
propagation = "rshared"
164+
}
165+
}
166+
}
69167
resources {
70-
cpu = 2000
168+
cpu = 600
71169
memory = 4096
72170
}
73171

74172
service {
75173
name = "$\u007BNOMAD_JOB_NAME\u007D"
76-
tags = ["urlprefix-squash.asipsante.fr/"]
174+
tags = ["urlprefix-${servername_squash}/"]
77175
port = "http"
78176
check {
79177
name = "alive"
@@ -84,6 +182,6 @@ EOH
84182
port = "http"
85183
}
86184
}
87-
}
185+
}
88186
}
89-
}
187+
}

squashtm-app/waypoint.hcl

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,26 @@ app "forge/squashtm-app" {
2828
image = var.image
2929
tag = var.tag
3030
datacenter = var.datacenter
31+
pluginjaxbapi = var.pluginjaxbapi
32+
pluginjaxbimpl = var.pluginjaxbimpl
33+
pluginbugtrackerjiracloud = var.pluginbugtrackerjiracloud
34+
servername_squash = var.servername_squash
35+
url_proxy_sortant_http_host = var.url_proxy_sortant_http_host
36+
url_proxy_sortant_https_host = var.url_proxy_sortant_https_host
37+
url_proxy_sortant_http_port = var.url_proxy_sortant_http_port
38+
url_proxy_sortant_https_port = var.url_proxy_sortant_https_port
39+
url_proxy_sortant_no_proxy = var.url_proxy_sortant_no_proxy
40+
repo_url = var.repo_url
3141
})
3242
}
3343
}
3444
}
3545

46+
variable "servername_squash" {
47+
type = string
48+
default = "squash.asipsante.fr"
49+
}
50+
3651
variable "datacenter" {
3752
type = string
3853
default = "test"
@@ -45,5 +60,47 @@ variable "image" {
4560

4661
variable "tag" {
4762
type = string
48-
default = "4.0.2"
63+
default = "5.0.1"
64+
}
65+
variable "pluginjaxbapi" {
66+
type = string
67+
default = "jaxb-api-2.2.2.jar"
68+
}
69+
70+
variable "pluginjaxbimpl" {
71+
type = string
72+
default = "jaxb-impl-2.2.3.jar"
73+
}
74+
75+
variable "pluginbugtrackerjiracloud" {
76+
type = string
77+
default = "bugtracker.jiracloud-5.0.0.RELEASE.jar"
78+
}
79+
variable "url_proxy_sortant_http_host" {
80+
type = string
81+
default = "c-ac-proxy01.asip.hst.fluxus.net"
82+
}
83+
84+
variable "url_proxy_sortant_https_host" {
85+
type = string
86+
default = "c-ac-proxy01.asip.hst.fluxus.net"
87+
}
88+
89+
variable "url_proxy_sortant_http_port" {
90+
type = string
91+
default = "3128"
92+
}
93+
94+
variable "url_proxy_sortant_https_port" {
95+
type = string
96+
default = "3128"
97+
}
98+
99+
variable "url_proxy_sortant_no_proxy" {
100+
type = string
101+
default = "\"*.asip.hst.fluxus.net|*.esante.gouv.fr|*.asipsante.fr\""
49102
}
103+
variable "repo_url" {
104+
type = string
105+
default = "https://repo.proxy.prod.forge.esante.gouv.fr"
106+
}

0 commit comments

Comments
 (0)