linux_provision 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.linux_provision.json +5 -3
- data/CHANGES +5 -1
- data/Gemfile.lock +1 -1
- data/Vagrantfile +62 -25
- data/demo/Dockerfile +27 -76
- data/lib/linux_provision/linux_provision.rb +4 -0
- data/lib/linux_provision/linux_provision_scripts.sh +21 -2
- data/lib/linux_provision/version.rb +1 -1
- data/presentation/virtualization/03-docker/slides.md +1 -1
- data/thor/demo_scripts.sh +3 -1
- data/thor/docker.thor +4 -3
- data/thor/linux_install.thor +12 -2
- metadata +2 -7
- data/demo/bin/start-server.sh +0 -7
- data/demo/supervisord.conf +0 -8
- data/docker/sshd/Dockerfile +0 -28
- data/docker/supervisord/Dockerfile +0 -28
- data/docker/supervisord/supervisord.conf +0 -8
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDUzZjY4NGRiZGIwZWIyOGM0MDI4Y2Q4OTZlNTI1ZDRmMWRiNzI4MQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDU3Mjc4OWNmYzYxZjQxZTEyMDk2MmY5NDk2YzVmNGI1MzFiNjQ2NA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDY1MDNiNTI0MzM4YjQ5ODE2OTY5ZDFhZTIyM2ZkNzE2ODdlY2EwNDM0MDQ3
|
10
|
+
ZjBlMzk1NDA5ZGQ4YzRkMDkxNGRlNTVkMTM3NWRkNzViNjRkMjkxMGM2ODVi
|
11
|
+
ZmM2N2M4NzMyOGIxNjM4ZWJhZTRlODE3ZGZhMDEyZWUyZDI4MTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDNiOTcxMmQ2ODBlNWEzOTAwZjVkYTEyNzNhMTM5ODAwNTU2MjU1NTIxMjAw
|
14
|
+
ZjRiYjE1M2NiYWQ5ZDU1NDNjMzU0ZDA2M2EyZGVmMDFmM2RiNDFiZjI3ZDg4
|
15
|
+
MTBmYjI3NzQ2NzFlNDFiMWNiZjMxODNiOTJiYmMxNTI2ZGJiNjU=
|
data/.linux_provision.json
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"node": {
|
3
|
-
"domain": "22.22.22.22",
|
3
|
+
//"domain": "22.22.22.22",
|
4
|
+
"domain": "192.168.59.103",
|
4
5
|
"user": "vagrant",
|
5
6
|
"password": "vagrant",
|
6
7
|
"home": "/home/vagrant",
|
7
|
-
"port": "
|
8
|
+
//"port": "22",
|
9
|
+
"port": "42222",
|
8
10
|
"remote": true
|
9
11
|
},
|
10
12
|
|
11
13
|
"project": {
|
12
|
-
"home": "#{node.home}/
|
14
|
+
"home": "#{node.home}/demo",
|
13
15
|
"ruby_version": "1.9.3",
|
14
16
|
"gemset": "linux_provision"
|
15
17
|
},
|
data/CHANGES
CHANGED
data/Gemfile.lock
CHANGED
data/Vagrantfile
CHANGED
@@ -1,27 +1,54 @@
|
|
1
1
|
# -*- mode: ruby -*-
|
2
2
|
# vi: set ft=ruby :
|
3
3
|
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
#
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
#
|
15
|
-
#
|
16
|
-
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
#
|
24
|
-
#
|
4
|
+
# Commands required to setup working docker enviro, link containers etc.
|
5
|
+
$setup = <<SCRIPT
|
6
|
+
echo "Setup..."
|
7
|
+
|
8
|
+
cd /home/vagrant/demo
|
9
|
+
|
10
|
+
# Stop and remove any existing containers
|
11
|
+
docker stop $(docker ps -a -q)
|
12
|
+
docker rm $(docker ps -a -q)
|
13
|
+
|
14
|
+
#docker stop demo
|
15
|
+
#docker rm demo
|
16
|
+
|
17
|
+
# Build containers from Dockerfiles
|
18
|
+
# docker build -t postgres docker/postgres
|
19
|
+
# docker build -t rails docker/rails
|
20
|
+
|
21
|
+
docker build -t demo demo
|
22
|
+
|
23
|
+
# Run and link the containers
|
24
|
+
# docker run -d -p 5432:5432 --name postgres postgres
|
25
|
+
# docker run --rm -p 9292:9292 --name rails rails ls
|
26
|
+
#docker run -d --name postgres -e POSTGRESQL_USER=docker -e POSTGRESQL_PASS=docker postgres:latest
|
27
|
+
#docker run --rm -p 42222:22 -p 9292:9292 -e POSTGRESQL_HOST='192.168.59.103' --name demo demo:latest /bin/bash -l -c "rackup"
|
28
|
+
|
29
|
+
docker run -d -p 42222:22 -p 9292:9292 --name demo demo
|
30
|
+
|
31
|
+
SCRIPT
|
32
|
+
|
33
|
+
# Commands required to ensure correct docker containers are started when the vm is rebooted.
|
34
|
+
$start = <<SCRIPT
|
35
|
+
echo "Start..."
|
36
|
+
|
37
|
+
# docker start postgres
|
38
|
+
# docker start rails
|
39
|
+
|
40
|
+
docker start demo
|
41
|
+
|
42
|
+
PATH=$PATH:/usr/local/bin
|
43
|
+
|
44
|
+
source $HOME/.rvm/scripts/rvm
|
45
|
+
|
46
|
+
cd $HOME/demo
|
47
|
+
|
48
|
+
rvm use 1.9.3@linux_provision_demo
|
49
|
+
|
50
|
+
rackup
|
51
|
+
SCRIPT
|
25
52
|
|
26
53
|
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
27
54
|
VAGRANTFILE_API_VERSION = "2"
|
@@ -44,7 +71,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
44
71
|
# within the machine from a port on the host machine. In the example below,
|
45
72
|
# accessing "localhost:8080" will access port 80 on the guest machine.
|
46
73
|
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
47
|
-
config.vm.network "forwarded_port",
|
74
|
+
config.vm.network "forwarded_port", guest: 9292, host: 9292
|
75
|
+
config.vm.network "forwarded_port", guest: 5432, host: 5433
|
48
76
|
|
49
77
|
# Create a private network, which allows host-only access to the machine
|
50
78
|
# using a specific IP.
|
@@ -64,7 +92,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
64
92
|
# the path on the guest to mount the folder. And the optional third
|
65
93
|
# argument is a set of non-required options.
|
66
94
|
# config.vm.synced_folder "../data", "/vagrant_data"
|
67
|
-
config.vm.synced_folder "../linux_provision", "/home/vagrant/
|
95
|
+
#config.vm.synced_folder "../linux_provision/demo", "/home/vagrant/demo"
|
68
96
|
|
69
97
|
# Provider-specific configuration so you can fine-tune various
|
70
98
|
# backing providers for Vagrant. These expose provider-specific options.
|
@@ -78,6 +106,15 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
78
106
|
# vb.customize ["modifyvm", :id, "--memory", "1024"]
|
79
107
|
# end
|
80
108
|
#
|
109
|
+
|
110
|
+
# config.vm.provision "docker"
|
111
|
+
#
|
112
|
+
# # Setup resource requirements
|
113
|
+
# config.vm.provider "virtualbox" do |v|
|
114
|
+
# v.memory = 2048
|
115
|
+
# v.cpus = 2
|
116
|
+
# end
|
117
|
+
|
81
118
|
# View the documentation for the provider you're using for more
|
82
119
|
# information on available options.
|
83
120
|
|
@@ -147,9 +184,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
147
184
|
|
148
185
|
# Setup the containers when the VM is first created
|
149
186
|
# config.vm.provision :shell, :path => "bootstrap.sh"
|
150
|
-
#
|
187
|
+
#config.vm.provision "shell", inline: $setup
|
151
188
|
|
152
189
|
# Make sure the correct containers are running
|
153
190
|
# every time we start the VM.
|
154
|
-
#
|
191
|
+
#config.vm.provision "shell", run: "always", inline: $start
|
155
192
|
end
|
data/demo/Dockerfile
CHANGED
@@ -2,106 +2,57 @@ FROM ubuntu:14.04
|
|
2
2
|
|
3
3
|
MAINTAINER Alexander Shvets "alexander.shvets@gmail.com"
|
4
4
|
|
5
|
-
# 1.
|
5
|
+
# 1. Update system
|
6
6
|
|
7
|
-
RUN apt-get update
|
7
|
+
RUN sudo apt-get update
|
8
8
|
|
9
|
-
RUN
|
10
|
-
RUN apt-get install -y g++
|
11
|
-
RUN apt-get install -y git
|
12
|
-
RUN apt-get -y -q install libpq-dev
|
9
|
+
RUN sudo locale-gen en_US.UTF-8
|
13
10
|
|
14
|
-
# for rvm
|
15
|
-
RUN apt-get -y -q install gawk make libreadline6-dev libyaml-dev libsqlite3-dev sqlite3
|
16
|
-
RUN apt-get -y -q install autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
|
17
11
|
|
18
|
-
#
|
19
|
-
|
20
|
-
#RUN apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3
|
12
|
+
# 2. Install sshd
|
21
13
|
|
22
|
-
|
14
|
+
RUN sudo apt-get install -y openssh-server
|
23
15
|
|
24
|
-
|
25
|
-
#RUN /src/create_db.sh
|
16
|
+
RUN mkdir /var/run/sshd
|
26
17
|
|
27
|
-
|
28
|
-
# database are possible.
|
29
|
-
#RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf
|
18
|
+
RUN echo 'root:root' |chpasswd
|
30
19
|
|
31
|
-
|
32
|
-
#RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
|
20
|
+
RUN sed --in-place=.bak 's/without-password/yes/' /etc/ssh/sshd_config
|
33
21
|
|
34
|
-
|
35
|
-
#EXPOSE 5432
|
22
|
+
EXPOSE 22
|
36
23
|
|
37
|
-
|
38
|
-
#VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]
|
24
|
+
CMD /usr/sbin/sshd -D
|
39
25
|
|
40
|
-
# Set the default command to run when starting the container
|
41
|
-
#CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"]
|
42
26
|
|
43
|
-
#
|
27
|
+
# 3. Create vagrant user
|
44
28
|
|
45
|
-
|
29
|
+
RUN groupadd vagrant
|
30
|
+
RUN useradd -d /home/vagrant -g vagrant -m -s /bin/bash vagrant
|
46
31
|
|
47
|
-
RUN
|
32
|
+
RUN sudo sed -i '$a vagrant ALL=(ALL) NOPASSWD: ALL' /etc/sudoers
|
48
33
|
|
49
|
-
RUN
|
34
|
+
RUN echo vagrant:vagrant | chpasswd
|
50
35
|
|
51
|
-
|
36
|
+
RUN sudo chown -R vagrant /home/vagrant
|
52
37
|
|
53
|
-
# Trick: make bundle command cashable
|
54
38
|
|
55
|
-
|
56
|
-
ADD ./Gemfile Gemfile
|
57
|
-
ADD ./Gemfile.lock Gemfile.lock
|
58
|
-
RUN /bin/bash -l -c "rvm --create use 1.9.3@linux_provision_demo && bundle"
|
39
|
+
# 4. Prepare directories for the project
|
59
40
|
|
60
41
|
# Add project dir to docker
|
61
42
|
|
62
|
-
ADD . /
|
63
|
-
WORKDIR /
|
64
|
-
|
65
|
-
# Add 'web' user which will run the application
|
66
|
-
#RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos ""
|
67
|
-
|
68
|
-
#RUN chown -R web:web /var/www &&\
|
69
|
-
# mkdir -p /var/bundle &&\
|
70
|
-
# chown -R web:web /var/bundle
|
71
|
-
#RUN su -c "cd /var/www && bundle install --deployment --path /var/bundle" -s /bin/bash -l web
|
72
|
-
#RUN chown -R web:web /var/www
|
73
|
-
#USER web
|
43
|
+
ADD . /home/vagrant/demo
|
44
|
+
WORKDIR /home/vagrant/demo
|
74
45
|
|
75
|
-
#RUN chmod +x /opt/demo/bin/create_db.sh
|
76
|
-
#RUN /bin/bash -l -c "rvm use 1.9.3@linux_provision_demo && rake db:migrate"
|
77
|
-
|
78
|
-
# Make server port available outside
|
79
46
|
EXPOSE 9292
|
80
47
|
|
81
|
-
#
|
82
|
-
#
|
83
|
-
|
84
|
-
CMD /bin/bash -l -c "rackup"
|
85
|
-
|
86
|
-
# 2. Install sshd
|
87
|
-
|
88
|
-
#RUN apt-get install -y openssh-server supervisor
|
89
|
-
|
90
|
-
#RUN mkdir /var/run/sshd
|
91
|
-
#RUN mkdir -p /var/log/supervisor
|
92
|
-
|
93
|
-
#RUN echo 'root:screencast' | chpasswd
|
94
|
-
|
95
|
-
#EXPOSE 22
|
48
|
+
# docker stop demo
|
49
|
+
# docker rm demo
|
96
50
|
|
97
|
-
#
|
98
|
-
|
99
|
-
#
|
100
|
-
|
101
|
-
#CMD ["/usr/bin/supervisord"]
|
51
|
+
# docker build -t demo demo
|
52
|
+
# docker run -d -p 42222:22 -p 9292:9292 --name demo demo
|
53
|
+
# ssh vagrant@192.168.59.103 -p 42222
|
54
|
+
# ssh root@192.168.59.103 -p 42222
|
102
55
|
|
103
|
-
#
|
56
|
+
# thor linux_install:general
|
57
|
+
# thor linux_install:app
|
104
58
|
|
105
|
-
# docker build -t demo demo
|
106
|
-
# docker run --rm -p 9292:9292 -e POSTGRESQL_HOST='192.168.59.104' --name demo demo /bin/bash -l -c "rake db:migrate"
|
107
|
-
# docker run --rm -p 9292:9292 -e POSTGRESQL_HOST='192.168.59.104' --name demo demo /bin/bash -l -c "rackup"
|
@@ -25,14 +25,13 @@ sudo apt-get install -y bison
|
|
25
25
|
sudo apt-get install -y pkg-config
|
26
26
|
sudo apt-get install -y libffi-dev
|
27
27
|
|
28
|
-
|
29
28
|
#######################################
|
30
29
|
[rvm]
|
31
30
|
# Installs rvm
|
32
31
|
|
33
32
|
curl -L https://get.rvm.io | bash
|
34
33
|
|
35
|
-
sudo chown -R vagrant /opt/vagrant_ruby
|
34
|
+
#sudo chown -R vagrant /opt/vagrant_ruby
|
36
35
|
|
37
36
|
|
38
37
|
#######################################
|
@@ -68,6 +67,15 @@ sudo apt-get install -y postgresql-client
|
|
68
67
|
sudo apt-get install -y libpq-dev
|
69
68
|
sudo apt-get install -y postgresql
|
70
69
|
|
70
|
+
sudo service postgresql restart
|
71
|
+
|
72
|
+
|
73
|
+
#######################################
|
74
|
+
[postgres_remote_access]
|
75
|
+
|
76
|
+
sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/9.1/main/postgresql.conf
|
77
|
+
sudo sed -i '$a host all all 0.0.0.0/0 md5' /etc/postgresql/9.1/main/pg_hba.conf
|
78
|
+
|
71
79
|
|
72
80
|
#######################################
|
73
81
|
[mysql]
|
@@ -89,6 +97,8 @@ sudo debconf-set-selections <<< "mysql-server-$MYSQL_SERVER_VERSION mysql-server
|
|
89
97
|
|
90
98
|
sudo apt-get -y install mysql-server
|
91
99
|
|
100
|
+
sudo service mysql restart
|
101
|
+
|
92
102
|
#sudo mysqladmin -u$MYSQL_USER password $MYSQL_PASSWORD
|
93
103
|
|
94
104
|
|
@@ -191,6 +201,15 @@ MYSQL_PASSWORD='#{mysql.password}'
|
|
191
201
|
mysql -h $HOST_NAME -u$MYSQL_USER -p$MYSQL_PASSWORD -e "drop database $SCHEMA;"
|
192
202
|
|
193
203
|
|
204
|
+
#######################################
|
205
|
+
[service_command]
|
206
|
+
|
207
|
+
SERVICE='#{service}'
|
208
|
+
COMMAND='#{command}'
|
209
|
+
|
210
|
+
sudo service $SERVICE $COMMAND
|
211
|
+
|
212
|
+
|
194
213
|
#######################################
|
195
214
|
[selenium]
|
196
215
|
# http://www.labelmedia.co.uk/blog/setting-up-selenium-server-on-a-headless-jenkins-ci-build-machine.html
|
@@ -147,7 +147,7 @@ docker build -t postgres docker/postgres
|
|
147
147
|
docker build -t demo demo
|
148
148
|
|
149
149
|
# Run and link the containers
|
150
|
-
docker run -d -p 5432:5432 --name postgres postgres
|
150
|
+
docker run -d -p 5432:5432 --name postgres postgres
|
151
151
|
|
152
152
|
docker run --rm -p 42222:22 -p 9292:9292 -e POSTGRESQL_HOST='192.168.59.103' --name demo demo:latest /bin/bash -l -c "rackup"
|
153
153
|
|
data/thor/demo_scripts.sh
CHANGED
@@ -12,7 +12,7 @@ cd $APP_HOME
|
|
12
12
|
|
13
13
|
source $USER_HOME/.rvm/scripts/rvm
|
14
14
|
|
15
|
-
rvm use #{project.ruby_version}@#{project.gemset}
|
15
|
+
rvm use #{project.ruby_version}@#{project.gemset} --create
|
16
16
|
|
17
17
|
bundle
|
18
18
|
|
@@ -31,4 +31,6 @@ cd $APP_HOME
|
|
31
31
|
|
32
32
|
source $USER_HOME/.rvm/scripts/rvm
|
33
33
|
|
34
|
+
rvm use #{project.ruby_version}@#{project.gemset}
|
35
|
+
|
34
36
|
rackup
|
data/thor/docker.thor
CHANGED
@@ -13,12 +13,13 @@ class Docker < Thor
|
|
13
13
|
# Build containers from Dockerfiles
|
14
14
|
execute <<-CODE
|
15
15
|
# Reset
|
16
|
-
|
17
|
-
|
16
|
+
docker stop demo
|
17
|
+
docker rm demo
|
18
18
|
|
19
19
|
# Build containers
|
20
20
|
# docker build -t postgres docker/postgres
|
21
21
|
docker build -t demo demo
|
22
|
+
docker run -d -p 42222:22 -p 9292:9292 --name demo demo
|
22
23
|
|
23
24
|
# Run and link the containers
|
24
25
|
# docker run -d -p 5432:5432 --name postgres postgres:latest
|
@@ -28,4 +29,4 @@ class Docker < Thor
|
|
28
29
|
# docker run -d -p 9292:9292 --name demo demo:latest /bin/bash -l -c "rackup"
|
29
30
|
CODE
|
30
31
|
end
|
31
|
-
end
|
32
|
+
end
|
data/thor/linux_install.thor
CHANGED
@@ -16,10 +16,14 @@ class LinuxInstall < Thor
|
|
16
16
|
invoke :rvm
|
17
17
|
invoke :ruby
|
18
18
|
|
19
|
-
invoke :node
|
20
|
-
invoke :jenkins
|
21
19
|
invoke :postgres
|
22
20
|
invoke :mysql
|
21
|
+
end
|
22
|
+
|
23
|
+
desc "special", "Installs special packages"
|
24
|
+
def special
|
25
|
+
invoke :node
|
26
|
+
invoke :jenkins
|
23
27
|
|
24
28
|
# invoke :selenium
|
25
29
|
end
|
@@ -38,6 +42,7 @@ class LinuxInstall < Thor
|
|
38
42
|
desc "all", "Installs all required packages"
|
39
43
|
def all
|
40
44
|
invoke :general
|
45
|
+
invoke :special
|
41
46
|
invoke :app
|
42
47
|
end
|
43
48
|
|
@@ -61,6 +66,11 @@ class LinuxInstall < Thor
|
|
61
66
|
LinuxInstall.installer.mysql_drop_schemas
|
62
67
|
end
|
63
68
|
|
69
|
+
desc "service", "Executes command for service"
|
70
|
+
def service service, command
|
71
|
+
LinuxInstall.installer.service service, command
|
72
|
+
end
|
73
|
+
|
64
74
|
desc "ssh", "ssh"
|
65
75
|
def ssh
|
66
76
|
#system "thor ssh:cp_key vagrant 22.22.22.22"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: linux_provision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: text-interpolator
|
@@ -127,23 +127,18 @@ files:
|
|
127
127
|
- demo/Gemfile.lock
|
128
128
|
- demo/Rakefile
|
129
129
|
- demo/app.rb
|
130
|
-
- demo/bin/start-server.sh
|
131
130
|
- demo/config.ru
|
132
131
|
- demo/db/migrate/20140610203958_create_notes.rb
|
133
132
|
- demo/db/migrate/20140610204302_add_notes.rb
|
134
133
|
- demo/db/schema.rb
|
135
134
|
- demo/db_setup.rb
|
136
135
|
- demo/note.rb
|
137
|
-
- demo/supervisord.conf
|
138
136
|
- demo/views/index.erb
|
139
137
|
- demo/views/layout.erb
|
140
138
|
- demo/views/new.erb
|
141
139
|
- demo/views/note.erb
|
142
140
|
- docker/postgres/Dockerfile
|
143
141
|
- docker/postgres/bin/create_db.sh
|
144
|
-
- docker/sshd/Dockerfile
|
145
|
-
- docker/supervisord/Dockerfile
|
146
|
-
- docker/supervisord/supervisord.conf
|
147
142
|
- lib/linux_provision.rb
|
148
143
|
- lib/linux_provision/linux_provision.rb
|
149
144
|
- lib/linux_provision/linux_provision_scripts.sh
|
data/demo/bin/start-server.sh
DELETED
data/demo/supervisord.conf
DELETED
data/docker/sshd/Dockerfile
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# https://registry.hub.docker.com/u/dhrp/sshd/
|
2
|
-
# http://stackoverflow.com/questions/23014684/how-to-get-ssh-connection-with-docker-container-on-osxboot2docker
|
3
|
-
|
4
|
-
# sshd
|
5
|
-
#
|
6
|
-
# VERSION 0.0.1
|
7
|
-
|
8
|
-
FROM ubuntu
|
9
|
-
MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com"
|
10
|
-
|
11
|
-
# make sure the package repository is up to date
|
12
|
-
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
|
13
|
-
RUN apt-get update
|
14
|
-
|
15
|
-
RUN apt-get install -y openssh-server
|
16
|
-
RUN mkdir /var/run/sshd
|
17
|
-
RUN echo 'root:screencast' |chpasswd
|
18
|
-
|
19
|
-
EXPOSE 22
|
20
|
-
|
21
|
-
CMD /usr/sbin/sshd -D
|
22
|
-
|
23
|
-
# docker build -t sshd docker/sshd
|
24
|
-
# docker run -d -P --name sshd sshd
|
25
|
-
|
26
|
-
# docker port sshd 22
|
27
|
-
# boot2docker ip
|
28
|
-
# ssh root@192.168.59.104 -p 49153
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# http://docs.docker.com/examples/using_supervisord/
|
2
|
-
|
3
|
-
FROM ubuntu:latest
|
4
|
-
MAINTAINER examples@docker.io
|
5
|
-
|
6
|
-
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
|
7
|
-
RUN apt-get update
|
8
|
-
RUN apt-get upgrade -y
|
9
|
-
|
10
|
-
RUN apt-get install -y openssh-server apache2 supervisor
|
11
|
-
RUN mkdir -p /var/run/sshd
|
12
|
-
RUN mkdir -p /var/log/supervisor
|
13
|
-
|
14
|
-
RUN echo 'root:screencast' |chpasswd
|
15
|
-
|
16
|
-
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
17
|
-
|
18
|
-
EXPOSE 22 80
|
19
|
-
|
20
|
-
CMD ["/usr/bin/supervisord"]
|
21
|
-
|
22
|
-
|
23
|
-
# docker build -t supervisord docker/supervisord
|
24
|
-
# docker run -p 22 -p 80 -t -i --name supervisord supervisord
|
25
|
-
|
26
|
-
# docker port sshd 22
|
27
|
-
# boot2docker ip
|
28
|
-
# ssh root@192.168.59.104 -p 49154
|