def amazon_linux_test_battery(): # create config helper ConfHelper = ConfigHelper(CONFIG_DIR, TEMPLATE_DIR) # launch ec2 ec2_conf = ConfHelper.get_config('test_amazon_linux') ec2_instance, ec2_connection = launch_new_ec2(ec2_conf, True) # do fab stuff to ec2 instance amzn_linux_fab = AmazonLinuxFab(ec2_conf, ec2_instance.public_dns_name) amzn_linux_fab.set_timezone('/usr/share/zoneinfo/America/Los_Angeles') amzn_linux_fab.update_system() amzn_linux_fab.install_custom_monitoring() amzn_linux_fab.install_git() amzn_linux_fab.install_jdk() amzn_linux_fab.install_maven() amzn_linux_fab.install_node() # pg setup init_sql_filename = 'init_test_db.sql' init_sql_path = os.path.join(TEMPLATE_DIR, init_sql_filename) amzn_linux_fab.install_pg(init_sql_path, init_sql_filename) # Terminate EC2 instance. tear_down(ec2_instance.id, ec2_connection)
def test_amazon_linux_stuff(self): amzn_linux_fab = AmazonLinuxFab(self.ec2_conf, self.ec2_instance.public_dns_name) amzn_linux_fab.set_timezone('/usr/share/zoneinfo/America/Los_Angeles') amzn_linux_fab.update_system() amzn_linux_fab.install_custom_monitoring() amzn_linux_fab.install_git() amzn_linux_fab.install_jdk() amzn_linux_fab.install_maven() amzn_linux_fab.install_node() # pg setup init_sql_filename = 'init_test_db.sql' init_sql_path = os.path.join(TEMPLATE_DIR, init_sql_filename) amzn_linux_fab.install_pg(init_sql_path, init_sql_filename)