parser = OptionParser() parser = get_opt_parser(parser=parser) (opts, args) = parser.parse_args() instance = launch_instance(opts) if not instance or not hasattr(instance, "dns_name"): print "Failed to launch an instance. Will exit" sys.exit(1) hostname = instance.dns_name ssh_key = opts.ssh_key ssh_user = opts.ssh_user # # open firewall # print "Updating firewall rules" ssh_command(hostname, ssh_user, ssh_key, "mkdir -p ~/etc/sysconfig") scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "~/etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo mv ~/etc/sysconfig/iptables /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo restorecon /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo chown root:root /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo service iptables restart") # # Copy scripts over # scp_to_command(hostname, ssh_user, ssh_key, "./env_vars", "~") scp_to_command(hostname, ssh_user, ssh_key, "%s/install_sam_splice_rpms.sh" % (SCRIPT_DIR), "~") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./install_sam_splice_rpms.sh") print "Install Katello + Splice RPMs" ssh_command(hostname, ssh_user, ssh_key, "time sudo ./install_sam_splice_rpms.sh &> ./install_sam_splice_rpms.log") # # Update EC2 tag with version of RCS installed #
parser = OptionParser() parser = get_opt_parser(parser=parser) (opts, args) = parser.parse_args() instance = launch_instance(opts) if not instance or not hasattr(instance, "dns_name"): print "Failed to launch an instance. Will exit" sys.exit(1) hostname = instance.dns_name ssh_key = opts.ssh_key ssh_user = opts.ssh_user # # open firewall # print "Updating firewall rules" ssh_command(hostname, ssh_user, ssh_key, "mkdir -p ~/etc/sysconfig") scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "~/etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo mv ~/etc/sysconfig/iptables /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo restorecon /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo chown root:root /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo service iptables restart") # # Copy scripts over # scp_to_command(hostname, ssh_user, ssh_key, "./env_vars", "~") scp_to_command(hostname, ssh_user, ssh_key, "./prepare.sh", "~") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./prepare.sh") scp_to_command(hostname, ssh_user, ssh_key, "%s/../*.rb" % (SCRIPT_DIR), "~")
if __name__ == "__main__": start = time.time() parser = OptionParser() parser = get_opt_parser(parser=parser, vol_size=100) (opts, args) = parser.parse_args() instance = launch_instance(opts) hostname = instance.dns_name ssh_key = opts.ssh_key ssh_user = opts.ssh_user # # open firewall # print "Updating firewall rules" ssh_command(hostname, ssh_user, ssh_key, "mkdir -p ~/tmp") scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "~/tmp/") ssh_command(hostname, ssh_user, ssh_key, "sudo cp ~/tmp/iptables /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo /sbin/service iptables restart") # # Run install script # print "Running install script for Pulp" scp_to_command(hostname, ssh_user, ssh_key, "./scripts/functions.sh", "~") scp_to_command(hostname, ssh_user, ssh_key, "./scripts/install_pulp.sh", "~") ssh_command(hostname, ssh_user, ssh_key, "sudo chmod +x ./install_pulp.sh") ssh_command(hostname, ssh_user, ssh_key, "time sudo ./install_pulp.sh &> ./pulp_rpm_setup.log ") # # Update EC2 tag with version of RCS installed # print "Update EC2 tag with RPM version of 'pulp-server' installed on %s" % (hostname)
parser = OptionParser() parser.add_option('--product_data', action="store", default=default_product_data, help="Product data for splice-certmaker: defaults to %s" % (default_product_data)) parser = get_opt_parser(parser=parser) (opts, args) = parser.parse_args() instance = launch_instance(opts) hostname = instance.dns_name product_data = opts.product_data ssh_key = opts.ssh_key ssh_user = opts.ssh_user # # open firewall # print "Updating firewall rules" scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "/etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "service iptables restart") # # Run install script # print "Running install script for RCS" scp_to_command(hostname, ssh_user, ssh_key, "./scripts/functions.sh", "~") scp_to_command(hostname, ssh_user, ssh_key, "./scripts/install_rpm_setup.sh", "~") scp_to_command(hostname, ssh_user, ssh_key, "./scripts/install_rcs.sh", "~") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./install_rpm_setup.sh") ssh_command(hostname, ssh_user, ssh_key, "time ./install_rpm_setup.sh &> ./splice_rpm_setup.log ") ssh_command(hostname, ssh_user, ssh_key, "time ./install_rcs.sh &> ./splice_rcs_install.log ") # # Upload product data to cert-maker # print "Uploading product_list data to splice-certmaker"
if not opts.sat_cert: print "Please re-run with '--sat_cert' pointing to a valid Satellite certificate" sys.exit(1) instance = launch_instance(opts) print "Instance %s is up: %s" % (instance.dns_name, datetime.now()) hostname = instance.dns_name ssh_key = opts.ssh_key ssh_user = opts.ssh_user rhn_user = opts.rhn_user rhn_pass = opts.rhn_pass sat_cert = opts.sat_cert # # open firewall # print "Updating firewall rules" scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "/etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "service iptables restart") # # Run install script # print "Running install script for Spacewalk: %s" % (datetime.now()) scp_to_command(hostname, ssh_user, ssh_key, "./scripts/functions.sh", "~") scp_to_command(hostname, ssh_user, ssh_key, "./scripts/install_spacewalk.sh", "~") # <- note spacewalk installer doesn't like this answer file in "~", it's unable to expand the "~" # and results in no answer file being found scp_to_command(hostname, ssh_user, ssh_key, "./scripts/spacewalk.answers", "/tmp/") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./install_spacewalk.sh") ssh_command(hostname, ssh_user, ssh_key, "time ./install_spacewalk.sh &> ./spacewalk_rpm_setup.log ") # Begin CandlePin Install print "Beginning Candlepin Install: %s" % (datetime.now())
parser = OptionParser() parser = get_opt_parser(parser=parser) (opts, args) = parser.parse_args() instance = launch_instance(opts) if not instance or not hasattr(instance, "dns_name"): print "Failed to launch an instance. Will exit" sys.exit(1) hostname = instance.dns_name ssh_key = opts.ssh_key ssh_user = opts.ssh_user # # open firewall # print "Updating firewall rules" ssh_command(hostname, ssh_user, ssh_key, "mkdir -p ~/etc/sysconfig") scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "~/etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo mv ~/etc/sysconfig/iptables /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo restorecon /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo chown root:root /etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "sudo service iptables restart") # # Copy scripts over # scp_to_command(hostname, ssh_user, ssh_key, "./env_vars", "~") scp_to_command(hostname, ssh_user, ssh_key, "./prepare.sh", "~") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./prepare.sh") scp_to_command(hostname, ssh_user, ssh_key, "%s/../*.rb" % (SCRIPT_DIR), "~") scp_to_command(hostname, ssh_user, ssh_key, "%s/setup_katello_devel_env.sh" % (SCRIPT_DIR), "~") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./setup_katello_devel_env.sh") scp_to_command(hostname, ssh_user, ssh_key, "%s/setup_splice_rails_engine.sh" % (SCRIPT_DIR), "~") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./setup_splice_rails_engine.sh")
if __name__ == "__main__": start = time.time() parser = OptionParser() parser = get_opt_parser(parser=parser) (opts, args) = parser.parse_args() instance = launch_instance(opts) hostname = instance.dns_name ssh_key = opts.ssh_key ssh_user = opts.ssh_user # # open firewall # print "Updating firewall rules" scp_to_command(hostname, ssh_user, ssh_key, "./etc/sysconfig/iptables", "/etc/sysconfig/iptables") ssh_command(hostname, ssh_user, ssh_key, "service iptables restart") # # Run install script # print "Running install script for Spacewalk" scp_to_command(hostname, ssh_user, ssh_key, "./scripts/functions.sh", "~") scp_to_command(hostname, ssh_user, ssh_key, "./scripts/install_spacewalk.sh", "~") # <- note spacewalk installer doesn't like this answer file in "~", it's unable to expand the "~" # and results in no answer file being found scp_to_command(hostname, ssh_user, ssh_key, "./scripts/spacewalk.answers", "/tmp/") ssh_command(hostname, ssh_user, ssh_key, "chmod +x ./install_spacewalk.sh") ssh_command(hostname, ssh_user, ssh_key, "time ./install_spacewalk.sh &> ./spacewalk_rpm_setup.log ") #