-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #117 from hurricanehrndz/develop
Develop
- Loading branch information
Showing
64 changed files
with
510 additions
and
289 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
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,71 @@ | ||
FROM centos:latest | ||
|
||
ENV container="docker" | ||
|
||
RUN yum clean all \ | ||
&& yum makecache \ | ||
&& yum install -y epel-release \ | ||
&& yum makecache \ | ||
&& yum install -y \ | ||
curl \ | ||
findutils \ | ||
gcc \ | ||
glibc-langpack-en.x86_64 \ | ||
libffi-devel \ | ||
net-tools \ | ||
openssh-server \ | ||
openssl-devel \ | ||
python2-devel \ | ||
python2-pip \ | ||
redhat-lsb \ | ||
redhat-rpm-config \ | ||
sudo \ | ||
systemd \ | ||
&& pip install --upgrade pip \ | ||
&& yum clean all \ | ||
&& if ! getent passwd <%= @username %>; then \ | ||
useradd -d /home/<%= @username %> -m -s /usr/bin/bash -p '*' <%= @username %>; \ | ||
fi \ | ||
&& echo "<%= @username %> ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \ | ||
&& echo "Defaults !requiretty" >> /etc/sudoers \ | ||
&& mkdir -p /home/<%= @username %>/.ssh \ | ||
&& chown -R <%= @username %> /home/<%= @username %>/.ssh \ | ||
&& chmod 0700 /home/<%= @username %>/.ssh \ | ||
&& echo '<%= IO.read(@public_key).strip %>' >> /home/<%= @username %>/.ssh/authorized_keys \ | ||
&& chown <%= @username %> /home/<%= @username %>/.ssh/authorized_keys \ | ||
&& chmod 0600 /home/<%= @username %>/.ssh/authorized_keys \ | ||
&& export LANG="en_US.UTF-8" && echo "LANG=\"en_US.UTF-8\"" > /etc/locale.conf \ | ||
&& cd /lib/systemd/system/sysinit.target.wants/; ls | grep -v systemd-tmpfiles-setup | /usr/bin/xargs rm -f $1 \ | ||
&& /usr/bin/rm -f /lib/systemd/system/multi-user.target.wants/* \ | ||
&& /usr/bin/rm -f /etc/systemd/system/*.wants/* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/local-fs.target.wants/* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/sockets.target.wants/*udev* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/sockets.target.wants/*initctl* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/basic.target.wants/* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/anaconda.target.wants/* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/plymouth* \ | ||
&& /usr/bin/rm -f /lib/systemd/system/systemd-update-utmp* \ | ||
&& sed -ri 's/^#?PubkeyAuthentication\s+.*/PubkeyAuthentication yes/' /etc/ssh/sshd_config \ | ||
&& sed -ri 's/^#?UsePrivilegeSeparation\s+.*/UsePrivilegeSeparation no/' /etc/ssh/sshd_config \ | ||
&& echo "UseDNS=no" >> /etc/ssh/sshd_config \ | ||
&& systemctl set-default multi-user.target \ | ||
&& ln -s /lib/systemd/system/sshd.service /etc/systemd/system/multi-user.target.wants/sshd.service \ | ||
&& ln -s /lib/systemd/system/systemd-journald.service /etc/systemd/system/multi-user.target.wants/systemd-journald.service \ | ||
&& echo $'[Unit]\ | ||
\nDescription=Finish boot up\ | ||
\nAfter=sshd.service\ | ||
\n\ | ||
\n[Service]\ | ||
\nType=oneshot\ | ||
\nRemainAfterExit=yes\ | ||
\nExecStartPre=/bin/sleep 3s\ | ||
\nExecStart=/bin/rm -f /run/nologin\ | ||
\n\ | ||
\n[Install]\ | ||
\nWantedBy=default.target' >> /etc/systemd/system/FinishBootUp.service \ | ||
&& ln -s /etc/systemd/system/FinishBootUp.service /etc/systemd/system/multi-user.target.wants/FinishBootUp.service | ||
|
||
|
||
EXPOSE 22 | ||
|
||
VOLUME [ "/sys/fs/cgroup" ] |
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
#!/bin/sh | ||
## Script is sepcifically for use on travis-ci | ||
|
||
set -e | ||
|
||
## This is an example setup script that you would encapsulate the installation | ||
# What version of avm setup to use | ||
echo "Setting up Ansible Version Manager" | ||
AVM_VERSION="v1.0.0" | ||
## Install Ansible 2.3.1 using pip and label it 'v2.3' | ||
export ANSIBLE_VERSIONS_0="2.3.1.0" | ||
export INSTALL_TYPE_0="pip" | ||
export ANSIBLE_LABEL_0="v2.3" | ||
## Install Ansible 2.4.1 using pip and label it 'v2.4' | ||
export ANSIBLE_VERSIONS_1="2.4.1.0" | ||
export INSTALL_TYPE_1="pip" | ||
export ANSIBLE_LABEL_1="v2.4" | ||
# Whats the default version | ||
export ANSIBLE_DEFAULT_VERSION="v2.4" | ||
|
||
## Create a temp dir to download avm | ||
avm_dir="$(mktemp -d 2> /dev/null || mktemp -d -t 'mytmpdir')" | ||
git clone https://github.com/ahelal/avm.git "${avm_dir}" > /dev/null 2>&1 | ||
|
||
## Run the setup | ||
/bin/sh ${avm_dir}/setup.sh | ||
|
||
exit 0 |
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
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
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
File renamed without changes.
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
File renamed without changes.
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
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,15 @@ | ||
--- | ||
test_dependencies: | ||
- gawk | ||
- git | ||
- make | ||
- man | ||
- procps | ||
- rsync | ||
- ruby | ||
- ruby-dev | ||
- tar | ||
|
||
build_tools: | ||
- make | ||
- tar |
Oops, something went wrong.