-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed Supervisor dependency that was dragging Python 2 into the installed packages. Everything is running with Python 3 now: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 15 0.6 0.2 285336 38156 ? S 16:38 0:00 /usr/bin/python3 /usr/bin/salt-master -d -l debug root 44 1.5 0.2 210236 39772 ? S 16:38 0:00 /usr/bin/python3 usr/bin/salt-api -d -l debug Fix #1
- Loading branch information
Showing
4 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
FROM opensuse:tumbleweed | ||
MAINTAINER Michele Bologna <michele.bologna@gmail.com> | ||
|
||
RUN zypper --non-interactive --no-gpg-checks refresh && \ | ||
zypper --non-interactive up --no-recommends -y && \ | ||
zypper --non-interactive in -y salt-master salt-api && \ | ||
zypper --non-interactive addrepo https://download.opensuse.org/repositories/devel:/languages:/python/openSUSE_Tumbleweed/devel:languages:python.repo && \ | ||
zypper --non-interactive --no-gpg-checks refresh && \ | ||
zypper --non-interactive in --no-recommends -y supervisor && \ | ||
RUN zypper --non-interactive in --no-recommends -y salt-master salt-api && \ | ||
zypper clean && \ | ||
useradd saltdev -p '$6$0BIlOqYqg5Rcuu5A$ojdWZ.aZztdSqPCnqsEE3ViRDcFAZ0MSp0UUvT23GG5mnbUOcalZPh8basKox2wcn4F1if2kfChOO/J1K2boe.' && \ | ||
mkdir /var/run/supervisord/ && \ | ||
sed -i -e 's/^user: salt$/user: root/g' /etc/salt/master | ||
|
||
COPY etc_master/supervisord.conf /etc/supervisor.d/supervisord.conf | ||
COPY etc_master/salt/master.d/autoaccept.conf /etc/salt/master.d/ | ||
COPY etc_master/salt/master.d/netapi.conf /etc/salt/master.d/ | ||
COPY entrypoint-master.sh /entrypoint-master.sh | ||
|
||
VOLUME ["/srv/salt"] | ||
|
||
EXPOSE 8000 | ||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor.d/supervisord.conf"] | ||
CMD /entrypoint-master.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
FROM opensuse:tumbleweed | ||
MAINTAINER Michele Bologna <michele.bologna@gmail.com> | ||
|
||
RUN zypper --non-interactive --no-gpg-checks refresh && \ | ||
zypper --non-interactive up --no-recommends -y && \ | ||
zypper --non-interactive in -y salt-minion && \ | ||
RUN zypper --non-interactive in --no-recommends -y salt-minion && \ | ||
zypper clean | ||
|
||
CMD ["/usr/bin/salt-minion", "-l", "debug"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Start the first process | ||
/usr/bin/salt-master -d -l debug | ||
status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "Failed to start salt-master: $status" | ||
exit $status | ||
fi | ||
|
||
# Start the second process | ||
usr/bin/salt-api -d -l debug | ||
status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "Failed to start salt-api: $status" | ||
exit $status | ||
fi | ||
|
||
# Naive check runs checks once a minute to see if either of the processes exited. | ||
# This illustrates part of the heavy lifting you need to do if you want to run | ||
# more than one service in a container. The container exits with an error | ||
# if it detects that either of the processes has exited. | ||
# Otherwise it loops forever, waking up every 60 seconds | ||
|
||
while sleep 60; do | ||
ps aux |grep salt-master |grep -q -v grep | ||
PROCESS_1_STATUS=$? | ||
ps aux |grep salt-api |grep -q -v grep | ||
PROCESS_2_STATUS=$? | ||
# If the greps above find anything, they exit with 0 status | ||
# If they are not both 0, then something is wrong | ||
if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then | ||
echo "One of the processes has already exited." | ||
exit 1 | ||
fi | ||
done |
This file was deleted.
Oops, something went wrong.