-
Notifications
You must be signed in to change notification settings - Fork 528
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
Gh142 support debian #151
Closed
Closed
Gh142 support debian #151
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
7bd6893
w/managed_recommended_packages, bridge_utils present on osfamily: deb…
hesco 9d7dc11
Add Debian os test case for contain_file('/etc/init.d/docker')
hesco 04d8d60
.gitignore rake_test.* result files
hesco f645659
Refactor docker::repos and docker::repo::(deb|yum)_packages, no regre…
hesco 082499c
add /etc/init.d/docker.io from upstream docker project, use bash for …
hesco b99e739
Handle $install_init_d_script; ubuntu, debian paths, in install.pp, n…
hesco d3efaa8
Begin testing debian path
hesco a3e5e53
Comment out beaker gems, use nokogiri w/ embedded xslt/xml libs
hesco 53368fa
Resolve 'nokogiri pit of doom and despair' w/ build-essential, libxml…
hesco 60b7043
Document debian testing dependencies in CONTRIBUTING.md
hesco a707971
restoring upstream Gemfile, changes to Gemfile.lock
hesco 4e94b57
Test only ubuntu for the moment, .gitignore test results
hesco cd3b4bb
restore working tests, starting over
hesco 36c55d2
provide test coverage for docker::repos refactor
hesco 8e29570
Add context for Debian operating system, exercise /etc/init.d/docker …
hesco b3e8542
Service['docker'] uses provider => 'init', for Debian OS
hesco d5d2539
Sanity check: Docker requires a 64bit cpu and kernel
hesco 91814c0
incorporate updates from package's init.d script
hesco 8882a3f
Sanity check: system reboot is required to enable the new kernel
hesco af01564
Debian needs Package['lxc-docker'], init.d provider. all require amd64
hesco e09bdd7
Busr bug: Sanity check: system reboot is required to enable the new k…
hesco 00ec9bf
Require 3.8.0+ kernel, test sanity check Notify['Reboot_required'] fo…
hesco aa01e20
Require minimum kernel for Debian, begin refactor from ::install to :…
hesco c598919
Refactor parameters from ::install to ::params, no regression
hesco c6572fc
w/managed_recommended_packages, bridge_utils present on osfamily: deb…
hesco 02d2a83
Add Debian os test case for contain_file('/etc/init.d/docker')
hesco 69deaf9
.gitignore rake_test.* result files
hesco e5b48c1
Refactor docker::repos and docker::repo::(deb|yum)_packages, no regre…
hesco d9c004e
add /etc/init.d/docker.io from upstream docker project, use bash for …
hesco 2589e65
Handle $install_init_d_script; ubuntu, debian paths, in install.pp, n…
hesco 05e6e6f
Begin testing debian path
hesco bc7b624
Comment out beaker gems, use nokogiri w/ embedded xslt/xml libs
hesco fd24be8
Resolve 'nokogiri pit of doom and despair' w/ build-essential, libxml…
hesco 196925c
Document debian testing dependencies in CONTRIBUTING.md
hesco 25c348e
restoring upstream Gemfile, changes to Gemfile.lock
hesco e2134f1
Test only ubuntu for the moment, .gitignore test results
hesco 0850283
restore working tests, starting over
hesco 00d58c6
provide test coverage for docker::repos refactor
hesco 4dde3dc
Add context for Debian operating system, exercise /etc/init.d/docker …
hesco 6f8c7e3
Service['docker'] uses provider => 'init', for Debian OS
hesco 4c890a1
Sanity check: Docker requires a 64bit cpu and kernel
hesco 35ce2df
incorporate updates from package's init.d script
hesco e1a776e
Sanity check: system reboot is required to enable the new kernel
hesco f387e4c
Debian needs Package['lxc-docker'], init.d provider. all require amd64
hesco f876179
Busr bug: Sanity check: system reboot is required to enable the new k…
hesco 1e3006b
Require 3.8.0+ kernel, test sanity check Notify['Reboot_required'] fo…
hesco 0ca3e8d
Require minimum kernel for Debian, begin refactor from ::install to :…
hesco d5cedea
Refactor parameters from ::install to ::params, no regression
hesco 960fafa
Merge branch 'gh142_support_debian' of https://github.com/hesco/garet…
hesco 3c0d350
Resolve merge conflicts in Gemfile
hesco 2b5c235
fix linting errors failing the travis CI build
hesco 1620ac1
document Debian support, amd64, kernel v3.8+ requirements, manage opt…
hesco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -4,3 +4,6 @@ spec/fixtures | |
.vagrant | ||
.yardoc | ||
doc | ||
rake_test/ | ||
vendor/ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
#!/bin/sh | ||
|
||
###!/bin/bash | ||
# https://github.com/dotcloud/docker/raw/master/contrib/init/sysvinit-debian/docker | ||
# 2014-07-14 | ||
|
||
### BEGIN INIT INFO | ||
# Provides: docker | ||
# Required-Start: $syslog $remote_fs | ||
# Required-Stop: $syslog $remote_fs | ||
# Should-Start: cgroupfs-mount cgroup-lite | ||
# Should-Stop: cgroupfs-mount cgroup-lite | ||
# Default-Start: 2 3 4 5 | ||
# Default-Stop: 0 1 6 | ||
# Short-Description: Create lightweight, portable, self-sufficient containers. | ||
# Description: | ||
# Docker is an open-source project to easily create lightweight, portable, | ||
# self-sufficient containers from any application. The same container that a | ||
# developer builds and tests on a laptop can run at scale, in production, on | ||
# VMs, bare metal, OpenStack clusters, public clouds and more. | ||
### END INIT INFO | ||
|
||
export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin | ||
|
||
BASE=$(basename $0) | ||
|
||
# modify these in /etc/default/$BASE (/etc/default/docker) | ||
DOCKER=/usr/bin/$BASE | ||
# This is the pid file managed by docker itself | ||
DOCKER_PIDFILE=/var/run/$BASE.pid | ||
# This is the pid file created/managed by start-stop-daemon | ||
DOCKER_SSD_PIDFILE=/var/run/$BASE-ssd.pid | ||
DOCKER_LOGFILE=/var/log/$BASE.log | ||
DOCKER_OPTS= | ||
DOCKER_DESC="Docker" | ||
|
||
# Get lsb functions | ||
. /lib/lsb/init-functions | ||
|
||
if [ -f /etc/default/$BASE ]; then | ||
. /etc/default/$BASE | ||
fi | ||
|
||
# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it) | ||
if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | grep -q upstart; then | ||
log_failure_msg "$DOCKER_DESC is managed via upstart, try using service $BASE $1" | ||
exit 1 | ||
fi | ||
|
||
# Check docker is present | ||
if [ ! -x $DOCKER ]; then | ||
log_failure_msg "$DOCKER not present or not executable" | ||
exit 1 | ||
fi | ||
|
||
fail_unless_root() { | ||
if [ "$(id -u)" != '0' ]; then | ||
log_failure_msg "$DOCKER_DESC must be run as root" | ||
exit 1 | ||
fi | ||
} | ||
|
||
cgroupfs_mount() { | ||
# see also https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount | ||
if grep -v '^#' /etc/fstab | grep -q cgroup \ | ||
|| [ ! -e /proc/cgroups ] \ | ||
|| [ ! -d /sys/fs/cgroup ]; then | ||
return | ||
fi | ||
if ! mountpoint -q /sys/fs/cgroup; then | ||
mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup | ||
fi | ||
( | ||
cd /sys/fs/cgroup | ||
for sys in $(awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do | ||
mkdir -p $sys | ||
if ! mountpoint -q $sys; then | ||
if ! mount -n -t cgroup -o $sys cgroup $sys; then | ||
rmdir $sys || true | ||
fi | ||
fi | ||
done | ||
) | ||
} | ||
|
||
case "$1" in | ||
start) | ||
fail_unless_root | ||
|
||
cgroupfs_mount | ||
|
||
touch "$DOCKER_LOGFILE" | ||
chgrp docker "$DOCKER_LOGFILE" | ||
|
||
ulimit -n 1048576 | ||
if [ "$BASH" ]; then | ||
ulimit -u 1048576 | ||
else | ||
ulimit -p 1048576 | ||
fi | ||
|
||
log_begin_msg "Starting $DOCKER_DESC: $BASE" | ||
start-stop-daemon --start --background \ | ||
--no-close \ | ||
--exec "$DOCKER" \ | ||
--pidfile "$DOCKER_SSD_PIDFILE" \ | ||
--make-pidfile \ | ||
-- \ | ||
-d -p "$DOCKER_PIDFILE" \ | ||
$DOCKER_OPTS \ | ||
>> "$DOCKER_LOGFILE" 2>&1 | ||
log_end_msg $? | ||
;; | ||
|
||
stop) | ||
fail_unless_root | ||
log_begin_msg "Stopping $DOCKER_DESC: $BASE" | ||
start-stop-daemon --stop --pidfile "$DOCKER_SSD_PIDFILE" | ||
log_end_msg $? | ||
;; | ||
|
||
restart) | ||
fail_unless_root | ||
docker_pid=`cat "$DOCKER_SSD_PIDFILE" 2>/dev/null` | ||
[ -n "$docker_pid" ] \ | ||
&& ps -p $docker_pid > /dev/null 2>&1 \ | ||
&& $0 stop | ||
$0 start | ||
;; | ||
|
||
force-reload) | ||
fail_unless_root | ||
$0 restart | ||
;; | ||
|
||
status) | ||
status_of_proc -p "$DOCKER_SSD_PIDFILE" "$DOCKER" "$DOCKER_DESC" | ||
;; | ||
|
||
*) | ||
echo "Usage: $0 {start|stop|restart|status}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change will generate the following error message because the mirror is defined before the package apt-transport-https is installed.
==> default: Notice: /Stage[main]/Apt::Update/Exec[apt_update]/returns: E: The method driver /usr/lib/apt/methods/https could not be found.