Alexandros Kosiaris has submitted this change and it was merged.

Change subject: service::node: use repo value for CWD and Env
......................................................................


service::node: use repo value for CWD and Env

Since we now allow a user to define the used repo, have values for
Working Directory and Environment settings set to that instead of the
previous default

Change-Id: Ie76ad944b94d243968cda5834bba73fa36d19eb8
---
M modules/service/templates/initscripts/node.systemd.erb
M modules/service/templates/initscripts/node.upstart.erb
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Alexandros Kosiaris: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/service/templates/initscripts/node.systemd.erb 
b/modules/service/templates/initscripts/node.systemd.erb
index 78c6ba6..35845d9 100644
--- a/modules/service/templates/initscripts/node.systemd.erb
+++ b/modules/service/templates/initscripts/node.systemd.erb
@@ -8,13 +8,13 @@
 LimitNOFILE=<%= @no_file %>
 User=<%= @title %>
 Group=<%= @title %>
-Environment="NODE_PATH=/srv/deployment/<%= @title %>/deploy/node_modules"
+Environment="NODE_PATH=/srv/deployment/<%= @repo %>/node_modules"
 Environment="<%= @title.gsub(/[^a-zA-Z0-9_]/, '_').upcase %>_PORT=<%= @port %>"
 Restart=always
 RestartSec=2s
 # wait 60 seconds for a graceful restart before killing the master
 TimeoutStopSec=60
-WorkingDirectory=/srv/deployment/<%= @title %>/deploy
+WorkingDirectory=/srv/deployment/<%= @repo %>
 ExecStart=/usr/bin/firejail --blacklist=root --blacklist=/home/* --tmpfs=/tmp 
--caps --seccomp /usr/bin/nodejs src/server.js -c /etc/<%= @title %>/config.yaml
 
 [Install]
diff --git a/modules/service/templates/initscripts/node.upstart.erb 
b/modules/service/templates/initscripts/node.upstart.erb
index da5a885..f67ab23 100644
--- a/modules/service/templates/initscripts/node.upstart.erb
+++ b/modules/service/templates/initscripts/node.upstart.erb
@@ -12,7 +12,7 @@
 setuid "<%= @title %>"
 setgid "<%= @title %>"
 
-env NODE_PATH="/srv/deployment/<%= @title %>/deploy/node_modules"
+env NODE_PATH="/srv/deployment/<%= @repo %>/node_modules"
 env <%= @title.gsub(/[^a-zA-Z0-9_]/, '_').upcase %>_PORT="<%= @port %>"
 
 respawn
@@ -20,5 +20,5 @@
 # wait 60 seconds for a graceful restart before killing the master
 kill timeout 60
 
-chdir /srv/deployment/<%= @title %>/deploy
+chdir /srv/deployment/<%= @repo %>
 exec /usr/bin/firejail --blacklist=root --blacklist=/home/* --tmpfs=/tmp 
--caps --seccomp /usr/bin/nodejs src/server.js -c /etc/<%= @title %>/config.yaml

-- 
To view, visit https://gerrit.wikimedia.org/r/247988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie76ad944b94d243968cda5834bba73fa36d19eb8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to