Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for running on CentOS 7 #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .rabbitmq-roll.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
af3c4411f18900deb1ddccb61213b843e98d4db5 src/erlang/otp_src_18.2.tar.gz 0B0LD0shfkvCRUUMwbHVhZ2hKMkU
c2ac46e48585e5f8f8d57ccc55ca83faa8b53b86 src/foundation-python-lockfile/lockfile-0.12.2.tar.gz 1aO_pv0dVmvocYrV45vwYQU0IVxPx2Eld
30e236b4d5375e04b6f01a51870c80dbdae7d723 src/foundation-python-pbr/pbr-3.1.1.tar.gz 1ZEWu7dnz52GFzP4IudFfhFVWAHAB21Xu
e333e9031424611b8974d2b2d2804dd26c4fae8e src/foundation-python-daemon/python-daemon-2.1.2.tar.gz 1uvpdY_dQp_mBRWcJ7EcLFd9fq77voU2i
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
#
# Rocks(r)
# www.rocksclusters.org
# version 6.1.1 (Sand Boa)
# version 6.2 (SideWinder)
# version 7.0 (Manzanita)
#
# Copyright (c) 2000 - 2014 The Regents of the University of California.
# Copyright (c) 2000 - 2017 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
63 changes: 63 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/sh
#
# This file should remain OS independent
#
# $Id: bootstrap.sh,v 1.6 2012/11/27 00:49:04 phil Exp $
#
# @Copyright@
#
# Rocks(r)
# www.rocksclusters.org
# version 6.2 (SideWinder)
# version 7.0 (Manzanita)
#
# Copyright (c) 2000 - 2017 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice unmodified and in its entirety, this list of conditions and the
# following disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# 3. All advertising and press materials, printed or electronic, mentioning
# features or use of this software must display the following acknowledgement:
#
# "This product includes software developed by the Rocks(r)
# Cluster Group at the San Diego Supercomputer Center at the
# University of California, San Diego and its contributors."
#
# 4. Except as permitted for the purposes of acknowledgment in paragraph 3,
# neither the name or logo of this software nor the names of its
# authors may be used to endorse or promote products derived from this
# software without specific prior written permission. The name of the
# software includes the following terms, and any derivatives thereof:
# "Rocks", "Rocks Clusters", and "Avalanche Installer". For licensing of
# the associated name, interested parties should contact Technology
# Transfer & Intellectual Property Services, University of California,
# San Diego, 9500 Gilman Drive, Mail Code 0910, La Jolla, CA 92093-0910,
# Ph: (858) 534-5815, FAX: (858) 534-7345, E-MAIL:[email protected]
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @Copyright@
#
. $ROLLSROOT/etc/bootstrap-functions.sh || exit 1

compile_and_install foundation-python-pbr
6 changes: 3 additions & 3 deletions graphs/default/rabbitmq.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</description>

<copyright>
Copyright (c) 2000 - 2014 The Regents of the University of California.
All rights reserved. Rocks(r) v6.1.1 www.rocksclusters.org
Copyright (c) 2000 - 2017 The Regents of the University of California.
All rights reserved. Rocks(r) v6.2/v7.0 www.rocksclusters.org

</copyright>

Expand All @@ -19,7 +19,7 @@
</changelog>

<!-- add edges here -->
<edge from="base" cond="RABBITMQ_Server">
<edge from="base" cond="hostname == RABBITMQ_Server">
<to>rabbitmq-service</to>
</edge>

Expand Down
15 changes: 15 additions & 0 deletions include/json/rabbitmq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"required": true,
"value": "",
"initialize": "Kickstart_PublicHostname",
"varname": "RABBITMQ_Server",
"infoHelp": "Short name of node that runs the RabbitMQ Server. This is often the frontend",
"param": "RabbitMQ Server Node",
"validate": null,
"derived": false,
"color": "light green",
"colorlabel": "light green",
"display": true
}
]
6 changes: 3 additions & 3 deletions nodes/rabbitmq-client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
</description>

<copyright>
Copyright (c) 2000 - 2014 The Regents of the University of California.
All rights reserved. Rocks(r) v6.1.1 www.rocksclusters.org
Copyright (c) 2000 - 2017 The Regents of the University of California.
All rights reserved. Rocks(r) v6.2/v7.0 www.rocksclusters.org

</copyright>

<changelog>
$Log$
</changelog>

<package>cryptoclient</package>
<!-- <package>cryptoclient</package> -->


</kickstart>
5 changes: 3 additions & 2 deletions nodes/rabbitmq-common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</description>

<copyright>
Copyright (c) 2000 - 2014 The Regents of the University of California.
All rights reserved. Rocks(r) v6.1.1 www.rocksclusters.org
Copyright (c) 2000 - 2017 The Regents of the University of California.
All rights reserved. Rocks(r) v6.2/v7.0 www.rocksclusters.org

</copyright>

Expand All @@ -23,4 +23,5 @@
<package>foundation-python-backports.ssl_match_hostname</package>
<package>foundation-python-paramiko</package>
<package>foundation-python-pycrypto</package>
<package>erlang</package>
</kickstart>
26 changes: 18 additions & 8 deletions nodes/rabbitmq-server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,42 @@
</description>

<copyright>
Copyright (c) 2000 - 2014 The Regents of the University of California.
All rights reserved. Rocks(r) v6.1.1 www.rocksclusters.org
Copyright (c) 2000 - 2017 The Regents of the University of California.
All rights reserved. Rocks(r) v6.2/v7.0 www.rocksclusters.org

</copyright>

<changelog>
$Log$
</changelog>

<package>cryptoserver</package>
<!-- <package>cryptoserver</package> -->

<post>
RabbitMQServiceNode=$(/opt/rocks/bin/rocks list host attr | /bin/awk -F: '/RABBITMQ_Server /{print $1}')
echo $RabbitMQServiceNode &gt; /opt/rocks/etc/rabbitmq.conf
chmod 400 /opt/rocks/etc/rabbitmq.conf

## Add the RABBITMQ_Server Attribute, if one doesn't exist
MQ_SERVER=&RABBITMQ_Server;
if [ "x$MQ_SERVER" = "x" ]; then
MQ_SERVER=&Kickstart_PublicHostname;
/opt/rocks/bin/rocks add attr RABBITMQ_Server $MQ_SERVER
fi

## Create the rabbitmq.conf file on Frontend
<file name="/opt/rocks/etc/rabbitmq.conf" perms="400" expr="echo $MQ_SERVER"/>

Files411=/var/411/Files.mk
/bin/grep -q rabbitmq.conf $Files411
if [ $? -ne 0 ]; then
# adding rabbitmq to 411 so we push the password to the nodes
echo "FILES_NOCOMMENT += /opt/rocks/etc/rabbitmq.conf" &gt;&gt; /var/411/Files.mk
echo "FILES_NOCOMMENT += /opt/rocks/etc/rabbitmq.conf" &gt;&gt; $Files411
/usr/bin/make -C /var/411 411.mk
fi

/usr/bin/getent group rabbitmq &gt;/dev/null 2&gt;&amp;1 || \
/usr/sbin/groupadd -r rabbitmq
/usr/bin/getent passwd rabbitmq &gt;/dev/null 2&gt;&amp;1 || \
/usr/sbin/useradd -c "RabbitMQ service" \
-d "/var/lib/rabbitmq" -g rabbitmq -s /bin/false -r rabbitmq

</post>


Expand Down
21 changes: 14 additions & 7 deletions nodes/rabbitmq-service.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,31 @@
</description>

<copyright>
Copyright (c) 2000 - 2014 The Regents of the University of California.
All rights reserved. Rocks(r) v6.1.1 www.rocksclusters.org
Copyright (c) 2000 - 2017 The Regents of the University of California.
All rights reserved. Rocks(r) v6.2/v7.0 www.rocksclusters.org

</copyright>

<changelog>
$Log$
</changelog>

<package>rabbitmq</package>
<package>erlang</package>
<package>rabbitmq-server</package>



<post>
RABBITMQ_UID=<eval>/usr/bin/getent passwd rabbitmq 2&gt;&amp;1 > /dev/null &amp;&amp; /usr/bin/id -u rabbitmq</eval>
RABBITMQ_GID=<eval>/usr/bin/getent group rabbitmq 2&gt;&amp;1 > /dev/null &amp;&amp; /usr/bin/id -g rabbitmq</eval>
RABBITMQ_UID=<eval>/usr/bin/getent passwd rabbitmq 2&gt;&amp;1 &gt; /dev/null &amp;&amp; /usr/bin/id -u rabbitmq</eval>
RABBITMQ_GID=<eval>/usr/bin/getent group rabbitmq 2&gt;&amp;1 &gt; /dev/null &amp;&amp; /usr/bin/id -g rabbitmq</eval>

### If the above evals are empty, then rabbitmq wasn't a user when
### kickstart was created. Read again from the environment
if [ "x$RABBITMQ_UID" == "x" ]; then
RABBITMQ_UID=$(/usr/bin/getent passwd rabbitmq 2&gt;&amp;1 &gt; /dev/null &amp;&amp; /usr/bin/id -u rabbitmq)
fi
if [ "x$RABBITMQ_GID" == "x" ]; then
RABBITMQ_GID=$(/usr/bin/getent group rabbitmq 2&gt;&amp;1 &gt; /dev/null &amp;&amp; /usr/bin/id -g rabbitmq)
fi

# rabbitmq UID|GID were created during install of the rabbitmq RPM
# we must set these to the same value as on the frontend so we don't
Expand Down Expand Up @@ -139,7 +146,7 @@ extendedKeyUsage = 1.3.6.1.5.5.7.3.1
<file name="/etc/rc.d/rocksconfig.d/post-99-restart-rabbitmq-config" perms="755">
#!/bin/bash
#
for i in `seq 1 360`; # wait for rabbitmq apps configs for 60 minutes
for i in `seq 1 6`; # wait for rabbitmq apps configs for 1 minute
do
for conf in $( ls /opt/rocks/etc | grep rabbitmq_ ); do
app_id=${conf#rabbitmq_}
Expand Down
5 changes: 3 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
#
# Rocks(r)
# www.rocksclusters.org
# version 6.1.1 (Sand Boa)
# version 6.2 (SideWinder)
# version 7.0 (Manzanita)
#
# Copyright (c) 2000 - 2014 The Regents of the University of California.
# Copyright (c) 2000 - 2017 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
Loading