# 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// /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