Refactoring the structure of our images
[people/jschlag/pbs-docker.git] / src / pbs-base / setup-org.sh
1 #!/bin/bash
2 #
3 #settings
4 #
5 #="database"
6
7 log() {
8 echo "#######################################"
9 echo ""
10 echo "$@"
11 echo ""
12 echo "#######################################"
13 }
14
15 # build the pbs from master branch
16 log "Update all packages"
17 yum update -y
18 log "Installing epel"
19 yum install -y epel-release
20 deps="python python-tornado python-daemon"
21
22 log "Installing dependencies"
23 yum install -y ${deps}
24
25
26 # add a user
27 groupadd -g 2000 pbs
28 useradd --system --no-create-home --shell /bin/bash --uid 2000 --gid 2000 pbs
29
30 mkdir -p /opt/pbs
31
32 # set permissions
33 chown -R pbs:pbs /opt/pbs
34
35 # cleanup
36 yum autoremove -y
37 yum clean all
38 rm -rf /var/tmp/* /var/cache/yum/* /opt/dev/*