Skip to content

Commit

Permalink
MORAY-416 Ship newer CLI tools and their manual pages in Moray zones
Browse files Browse the repository at this point in the history
Reviewed by: David Pacheco <dap@joyent.com>
Reviewed by: Julien Gilli <julien.gilli@joyent.com>
Approved by: Julien Gilli <julien.gilli@joyent.com>
  • Loading branch information
melloc committed Apr 28, 2017
1 parent a6b6280 commit d362db4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions boot/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#

#
# Copyright (c) 2015, Joyent, Inc.
# Copyright (c) 2017, Joyent, Inc.
#

export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
Expand Down Expand Up @@ -184,9 +184,11 @@ function sdc_moray_setup {
-keyout /opt/smartdc/$role/ssl/key.pem \
-out /opt/smartdc/$role/ssl/cert.pem -days 3650

# Add build/node/bin and node_modules/.bin to PATH
# Add node and CLI tools to PATH, and manual pages to MANPATH
echo "" >>/root/.profile
echo "export PATH=\$PATH:/opt/smartdc/$role/build/node/bin:/opt/smartdc/$role/node_modules/.bin:/opt/smartdc/$role/node_modules/$role/bin" >>/root/.profile
echo "export MANPATH=/opt/smartdc/$role/node_modules/moray/man:\$MANPATH" >> /root/.profile


# Log Rotation FTW
# What about manta/haproxy?
Expand All @@ -203,6 +205,9 @@ function manta_setup_moray_config {
echo 'function req() { grep "$@" `svcs -L moray` | bunyan ;}' >> $PROFILE
echo 'export PATH=/opt/smartdc/moray/bin:$PATH' >> $PROFILE

# Add manual pages to MANPATH
echo "export MANPATH=/opt/smartdc/$role/node_modules/moray/man:\$MANPATH" >> /root/.profile

local moray_cfg=$SVC_ROOT/etc/config.json
local svc_name=$(json -f ${METADATA} SERVICE_NAME)
[[ $? -eq 0 ]] || fatal "Unable to retrieve service name"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"lru-cache": "2.5.0",
"node-manatee": "git+https://github.com/joyent/node-manatee.git#c2ad9ae",
"manatee": "git+https://github.com/joyent/manatee.git#86ae52d",
"moray": "git+https://github.com/joyent/node-moray.git#fd5781b",
"moray": "3.1.1",
"microtime": "0.5.1",
"once": "1.3.0",
"panic": "0.2.1",
Expand Down

0 comments on commit d362db4

Please sign in to comment.