-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathks_ISLE.cfg
202 lines (168 loc) · 5.84 KB
/
ks_ISLE.cfg
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# Kickstart file
install
#text
#url --url http://mirror.centos.org/centos/7/os/x86_64
lang en_US.UTF-8
keyboard --vckeymap=us --xlayouts='us'
network --bootproto=dhcp
firewall --disabled
authconfig --useshadow --passalgo=sha512
selinux --disabled
timezone --utc America/New_York
bootloader --location=mbr
clearpart --all
part /boot --fstype=xfs --ondisk=sda --size=512
part swap --ondisk=sda --size=8192
part / --fstype=xfs --ondisk=sda --size=1 --grow
#part /opt/fed-data-ld --fstype=xfs --ondisk=sdb --size=1 --grow
#
# create a default user
#
# set to "isle2017" (you can generate it with (python -c 'import crypt; print(crypte.crypt("Your New Password"))' )
#
user --name=islandora --homedir=/home/islandora --shell=/bin/bash --password=$6$GmR0Ctz6$O8fdlGEJjgVmLG3VKEkk6ODX7pgiTl4XRv4eKBmEvjlrZirOjyVbxd66HIIbcgRXzK6ACIt3wlTFcn.DBL/eW1 --iscrypted
%packages
@core
%end
%pre --log=/root/installation_pre.log
#HostName=`hostname -f`
mkdir -p /mnt/ks
# clear the MBR and partition table
#dd if=/dev/zero of=/dev/sda bs=512 count=1
#parted -s /dev/sda mklabel msdos
# clear the MBR and partition table
#dd if=/dev/zero of=/dev/sdb bs=512 count=1
#parted -s /dev/sdb mklabel msdos
%end
%post --log=/root/installation_post.log
#---------------------------------------------
#
# Variable Declarations (edit for your setup)
#
#---------------------------------------------
#
#
# Set machine hostname
#
# uncomment the pre HostName declaration (above) along with the following two lines.
# this will set the machine hostname to what is assigned from DHCP on the network.
#
#hostname $HostName
#echo ${HostName} > /etc/hostname
#
# install EPEL yum repo
#
yum -y install epel-release
yum -y install bind-utils
yum -y install nfs-utils
#
# The next set of commands you can uncomment to have the graphical environment installed and have it automatically
# log in as the islandora user. This might be handy for those who aren't as command line savvy.
#
# Install Graphical user interface
#
#yum -y groupinstall gnome-apps kde-desktop kde-apps print-client x11
#yum -y install gcc freeglut freeglut-devel gl-manpages libICE-devel libSM-devel libX11-devel libXau-devel libXdamage-devel libXext-devel libXi-devel libXmu-devel libXt-devel libXxf86vm-devel libdrm-devel libxcb-devel mesa-libGL-devel mesa-libGLU-devel xorg-x11-proto-devel
#rpm -ev initial-setup-gui initial-setup
#rpm -ev gnome-initial-setup
#
# set graphical login
#
#systemctl set-default graphical.target
#
# Configure autologin for islandora user
#
#sed -i 's|\[daemon\]|\[daemon\]\nAutomaticLoginEnable\=true\nAutomaticLogin\=islandora\n|g' /etc/gdm/custom.conf
#
# Update OS
#
yum -y update
#
# Set up mail alias for root
# (enter your email address so messages from the admin account (root) will get sent to someone. Then uncomment the following three lines.)
#
#sed -i s/\#root\:/root\:/ /etc/aliases
#sed -i s/marc/<[email protected]>/ /etc/aliases
#newaliases
#
# Configure /etc/hosts for container names
#
sed -i 's|127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4|127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4\n127.0.0.1 isle.localdomain fedora.isle.localdomain apache.isle.localdomain fedora apache|g' /etc/hosts
#
# Configure islandora user for docker
#
groupadd docker
usermod -aG docker islandora
usermod -aG wheel islandora
#
# Setup sudo for islandora
#
echo "islandora ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/islandora
#
# Set home directory permissions
#
chown -R islandora:islandora /home/islandora
#
# Installation of ISLE (https://islandora-collaboration-group.github.io/ISLE/1_system_process_overview/1_4_testing/alpha_build_guide_linux/)
#
#
# Install Requirements
#
yum -y install openssl git htop ntp wget
#
# Install docker
#
#wget -qO- https://get.docker.com/ | sh
yum -y install docker
#systemctl enable docker.service
#systemctl start docker.service
yum install -y python-pip
pip install --upgrade pip
pip install docker-compose
#
# Git the ISLE docker setup
#
cd /opt
git clone https://github.com/Islandora-Collaboration-Group/ISLE.git
chown -Rv islandora:islandora ISLE
#docker volume create --driver local --opt type=xfs --opt device=/dev/sdb1 fed-data-ld
#
# edit config for linux
#
# This has been changed to have the linux settings.php enabled by default. Only for future reference.
#sed -i 's|#- ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php|- ./customize/apache/site/linux_settings.php:/var/www/html/sites/default/settings.php|g' /opt/ISLE/docker-compose.yml
#sed -i 's|- ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php|#- ./customize/apache/site/macosx_settings.php:/var/www/html/sites/default/settings.php|g' /opt/ISLE/docker-compose.yml
#
# Make sure docker is up
#
#/usr/bin/dockerd (doesn't work in a chroot environment)
#
# At this point docker is installed but the starting of the service (above) doesn't start.
# When this host is getting installed from kickstart the host is running in a chroot environment.
# So run the following manually from here after the host first boots up to finish the process.
# At this point we'll have a fully ready base machine image set up to build the containers and
# bring them up. Eventually I'll work out a way to fully automate this.
#
# Install docker containers
#
# docker-compose up -d
#
# tweak the setup and install a site
#
# docker exec -it isle-apache bash
# cd /tmp/isle_drupal_build_tools
# ./install_isle_ld_site.sh
#
# Install portainer software to manage Docker containers (https://portainer.io)
# login at http://islandora-docker.com:9000
#
#docker volume create portainer_data
#docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
echo ""
echo "#"
echo "# FINISHED with installation of this Linux host in ${SECONDS} seconds."
echo -n "#"
echo `date`
echo ""
reboot
%end