forked from docker-in-practice/docker-dev-tools-image
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev_tools.py
More file actions
51 lines (43 loc) · 1.75 KB
/
Copy pathdev_tools.py
File metadata and controls
51 lines (43 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
"""ShutIt module. See http://shutit.tk
"""
from shutit_module import ShutItModule
import string
class dev_tools(ShutItModule):
def build(self, shutit):
# git
shutit.install('git')
shutit.send('groupadd -g 1000 imiell')
shutit.send('useradd -d /home/imiell -s /bin/bash -m imiell -u 1000 -g 1000')
shutit.login(user='imiell')
shutit.send('git clone https://github.com/ianmiell/dotfiles.git ~/.dotfiles')
shutit.send('cd ~/.dotfiles')
# TODO other git repos
shutit.multisend('script/bootstrap',{'What is your github author name':'Ian Miell','What is your github author email':'ian.miell@gmail.com'})
shutit.logout()
# CPAN
shutit.multisend('cpan',{'Would you like to configure as much as possible automatically':'','What approach do you want':'','Would you like me to automatically choose some CPAN mirror':'','Would you like me to append that to /home/imiell/.bashrc now':'','cpan.1.>':'exit'})
# CPAN requires a re-login
shutit.login(command='su -')
shutit.send('cpan install Graph::Easy') # Allows rendering of graphs as text files: http://search.cpan.org/~tels/Graph-Easy/bin/graph-easy
shutit.logout()
# pips
shutit.send_host_file('/tmp/requirements.txt','context/requirements.txt')
shutit.send('pip install -r /tmp/requirements.txt')
shutit.send('rm -f /tmp/requirements.txt')
return True
def get_config(self, shutit):
shutit.get_config(self.module_id,'type','monolith')
return True
def finalize(self, shutit):
shutit.install('manpages man-db')
shutit.send('updatedb')
shutit.send('apt-file update')
shutit.send('apt-get clean')
return True
def module():
return dev_tools(
'ianmiell.github.com.dev_tools.dev_tools', 81940468.001,
description='imiell dev tools image',
maintainer='',
depends=['shutit.tk.setup']
)