This file contains hidden or 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
docker image build -t registrybox:5000/containerheartbeatapp:1.0 . | |
echo "<IP of registrybox VM> registrybox" >> /etc/hosts | |
docker push registrybox:5000/containerheartbeatapp:1.0 | |
docker stack deploy -c docker-compose.yml stack1 |
This file contains hidden or 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
docker-machine ssh worker1 docker swarm join --token SWMTKN-1-3hhtlhvogcaiqwmuy3hhdfluhk2zaomrjzrjvt3oh5csi1h76l-czo78hpnaxjq2dz08klrsyz4d <IP of swarmmanager VM>:2377 | |
docker-machine ssh swarmmanager1 docker node ls |
This file contains hidden or 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
docker-machine ssh worker1 docker swarm join --token SWMTKN-1-3hhtlhvogcaiqwmuy3hhdfluhk2zaomrjzrjvt3oh5csi1h76l-czo78hpnaxjq2dz08klrsyz4d <IP of swarmmanager VM>:2377 |
This file contains hidden or 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
ssh swarmmanager1 docker swarm init --advertise-addr <IP of the swarmmanager VM> |
This file contains hidden or 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
docker-machine ssh swarmmanager1 ping -c 3 registrybox | |
echo $? | |
docker-machine ssh worker1 ping -c 3 registrybox | |
echo $? | |
docker-machine ssh swarmmanager1 docker info | grep registrybox; echo $? | |
docker-machine ssh worker1 docker info | grep registrybox; echo $? |
This file contains hidden or 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
docker-machine ssh worker1 | |
sudo su | |
echo "<IP of the registrybox VM >" >> /etc/hosts | |
docker-machine ssh swarmmanager1 | |
sudo su | |
echo "<IP of the registrybox VM>" >> /etc/hosts |
This file contains hidden or 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
docker-machine create --driver=virtualbox registrybox | |
docker-machine create --driver=virtualbox --engine-insecure-registry registrybox:5000 swarmmanager1 | |
docker-machine create --driver=virtualbox --engine-insecure-registry registrybox:5000 worker1 | |
docker-machine ssh registrybox docker run -d -p 5000:5000 registry:2 | |
docker-machine ls |
This file contains hidden or 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
root@dumiduh-thinkpad:/home# python | |
Python 2.7.6 (default, Oct 26 2016, 20:30:19) | |
[GCC 4.8.4] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import os, shutil | |
>>> dir(os) | |
['EX_CANTCREAT', 'EX_CONFIG', 'EX_DATAERR', 'EX_IOERR', 'EX_NOHOST', 'EX_NOINPUT', 'EX_NOPERM', 'EX_NOUSER', 'EX_OK', 'EX_OSERR', 'EX_OSFILE', 'EX_PROTOCOL', 'EX_SOFTWARE', 'EX_TEMPFAIL', 'EX_UNAVAILABLE', 'EX_USAGE', 'F_OK', 'NGROUPS_MAX', 'O_APPEND', 'O_ASYNC', 'O_CREAT', 'O_DIRECT', 'O_DIRECTORY', 'O_DSYNC', 'O_EXCL', 'O_LARGEFILE', 'O_NDELAY', 'O_NOATIME', 'O_NOCTTY', 'O_NOFOLLOW', 'O_NONBLOCK', 'O_RDONLY', 'O_RDWR', 'O_RSYNC', 'O_SYNC', 'O_TRUNC', 'O_WRONLY', 'P_NOWAIT', 'P_NOWAITO', 'P_WAIT', 'R_OK', 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'ST_APPEND', 'ST_MANDLOCK', 'ST_NOATIME', 'ST_NODEV', 'ST_NODIRATIME', 'ST_NOEXEC', 'ST_NOSUID', 'ST_RDONLY', 'ST_RELATIME', 'ST_SYNCHRONOUS', 'ST_WRITE', 'TMP_MAX', 'UserDict', 'WCONTINUED', 'WCOREDUMP', 'WEXITSTATUS', 'WIFCONTINUED', 'WIFEXITED', 'WIFSIGNALED', 'WI |
This file contains hidden or 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
Permissions and ownership were modified.. | |
/home/dumiduh/pythonian/dfile5 1000 1000 33200 110110000 | |
Permissions and ownership were modified.. | |
/home/dumiduh/pythonian/shrubbery 1000 1000 33200 110110000 | |
Permissions and ownership were modified.. | |
/home/dumiduh/pythonian/rfile2 1000 1000 33200 110110000 | |
Permissions and ownership were modified.. | |
/home/dumiduh/pythonian/dfile4 1000 1000 33200 110110000 | |
Permissions and ownership were modified.. | |
/home/dumiduh/pythonian/rfile1 1000 1000 33200 110110000 |
This file contains hidden or 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
import os | |
folder="/home/dumiduh/pythonian/" | |
files=os.listdir(folder) | |
for file in files: | |
fqfilename=folder+str(file) | |
os.chown(fqfilename,1000,1000) | |
os.chmod(fqfilename,0660) | |
modemasked=os.stat(fqfilename).st_mode |