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
| require "fileutils" | |
| require "digest/sha2" | |
| module ProjectHanlon | |
| module ImageService | |
| # Base image abstract | |
| class Base < ProjectHanlon::Object | |
| MOUNT_COMMAND = (Process::uid == 0 ? "mount" : "sudo -n mount") | |
| UMOUNT_COMMAND = (Process::uid == 0 ? "umount" : "sudo -n umount") |
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
| Log file initialized... | |
| E, [2014-07-02T17:10:00.977000 #5609] ERROR -- image_service/base.rb:129:in `archive_handler?'>>ProjectHanlon::ImageService::OSInstall#archive_handler?: fullpath test: Version: 20070708 | |
| Usage: /usr/bin/fuseiso [-n] [-p] [-c <iocharset>] [-h] <isofs_image_file> <mount_point> [<FUSE library options>] | |
| Where options are: | |
| -n -- do NOT maintain file $HOME/.mtab.fuseiso | |
| -p -- maintain mount point; | |
| create it if it does not exists and delete it on exit | |
| -c <iocharset> -- specify iocharset for Joliet filesystem | |
| -h -- print this screen |
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
| require "fileutils" | |
| require "digest/sha2" | |
| module ProjectHanlon | |
| module ImageService | |
| # Base image abstract | |
| class Base < ProjectHanlon::Object | |
| MOUNT_COMMAND = (Process::uid == 0 ? "mount" : "sudo -n mount") | |
| UMOUNT_COMMAND = (Process::uid == 0 ? "umount" : "sudo -n umount") |
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
| virt-sysprep -a /dev/virtualmachine/virctlpaw002 --hostname virctlpaw002.virtomation.com \ | |
| --firstboot-command "sed -i -r 's/IPADDR=(\b[0-9]{1,3}\.){3}[0-9]{1,3}\b'/IPADDR=10.53.252.62/ /etc/sysconfig/network-scripts/ifcfg-eth0" \ | |
| --firstboot-command 'systemctl restart network' \ | |
| --firstboot-command 'yum install -y http://rdo.fedorapeople.org/rdo-release.rpm' \ | |
| --firstboot-command 'yum install openstack-packstack -y' |
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
| for serv in "cinder" "nova" "neutron" "heat"; | |
| do | |
| passwd=`openssl rand -base64 8` | |
| echo "$serv - $passwd" | |
| rabbitmqctl add_user $serv $passwd | |
| done |
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
| yum install http://mirror.sfo12.us.leaseweb.net/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm | |
| yum install mongodb-server mongodb -y | |
| systemctl restart mongod.service | |
| systemctl start tomcat.service | |
| yum install tomcat tomcat-admin-webapps | |
| vi /etc/tomcat/tomcat-users.xml | |
| systemctl status tomcat | |
| systemctl start tomcat |
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
| __author__ = 'jcallen' | |
| from subprocess import Popen, PIPE | |
| import syslog | |
| import httplib | |
| import sys | |
| import re | |
| import json | |
| import traceback |
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
| mkdir /mnt/cdrom | |
| mkdir /rhel | |
| mount -o loop rhel-server-6.5-x86_64-dvd.iso /mnt/cdrom | |
| cat > /etc/yum.repos.d/rhel-dvd.repo <<EOF | |
| [dvd] | |
| name=Red Hat Enterprise Linux Installation DVD | |
| baseurl=file:///mnt/cdrom/Server | |
| enabled=0 |
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
| #!/bin/bash | |
| # Kickstart for RHEL/CentOS 6 | |
| # see: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/s1-kickstart2-options.html | |
| install | |
| url --url=http://<%= config.hanlon_server %>:<%= config.api_port %><%= config.websvc_root %>/image/os/<%= @image_uuid %> | |
| text | |
| lang en_US.UTF-8 | |
| keyboard us | |
| rootpw <%= @root_password %> |
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
| diff --git a/core/image_service/base.rb b/core/image_service/base.rb | |
| index a38368d..e94bc93 100644 | |
| --- a/core/image_service/base.rb | |
| +++ b/core/image_service/base.rb | |
| @@ -94,7 +94,7 @@ module ProjectHanlon | |
| logger.error e.message | |
| return cleanup_on_failure(create_mount_success, create_imagepath_success, e.message) | |
| end | |
| - | |
| +puts ">>>>> in base.rb add_image" |