Cfn

 view release on metacpan or  search on metacpan

t/cfn_json/WordPress_Multi_AZ.json  view on Meta::CPAN

        "KeyName"        : { "Ref" : "KeyName" },
        "UserData"       : { "Fn::Base64" : { "Fn::Join" : ["", [
          "#!/bin/bash\n",
          "yum update -y aws-cfn-bootstrap\n",

          "/opt/aws/bin/cfn-init -s ", { "Ref" : "AWS::StackId" }, " -r LaunchConfig ",
          "         --region ", { "Ref" : "AWS::Region" }, "\n",
          "/opt/aws/bin/cfn-signal -e $? '", { "Ref" : "WaitHandle" }, "'\n",

          "# Setup correct file ownership\n",
          "chown -R apache:apache /var/www/html/wordpress\n",
          
          "# Add keys and salts to the config file\n",
          "wp_config=/var/www/html/wordpress/wp-config.php\n",
          "GET https://api.wordpress.org/secret-key/1.1/salt/ >> $wp_config\n",
          "echo \"define('WPLANG'            , '');\" >> $wp_config\n",
          "echo \"define('WP_DEBUG'          , false);\" >> $wp_config\n", 
          "echo \"\\$table_prefix  = 'wp_';\" >> $wp_config\n",
          "echo \"if ( !defined('ABSPATH') )\" >> $wp_config\n",
          "echo \"    define('ABSPATH', dirname(__FILE__) . '/');\" >> $wp_config\n",
          "echo \"require_once(ABSPATH . 'wp-settings.php');\" >> $wp_config\n"

t/cfn_json/WordPress_Single_Instance.json  view on Meta::CPAN


          "# Install Apache Web Server, MySQL, PHP and WordPress\n",
          "/opt/aws/bin/cfn-init -s ", { "Ref" : "AWS::StackId" }, " -r WebServer ",
          "    --region ", { "Ref" : "AWS::Region" }, " || error_exit 'Failed to run cfn-init'\n",

          "# Setup MySQL root password and create a user\n",
          "mysqladmin -u root password '", { "Ref" : "DBRootPassword" }, "' || error_exit 'Failed to initialize root password'\n",
          "mysql -u root --password='", { "Ref" : "DBRootPassword" }, "' < /tmp/setup.mysql || error_exit 'Failed to create database user'\n",

          "# Setup correct file ownership\n",
          "chown -R apache:apache /var/www/html/wordpress\n",
          
          "# Add keys and salts to the config file\n",
          "wp_config=/var/www/html/wordpress/wp-config.php\n",
          "GET https://api.wordpress.org/secret-key/1.1/salt/ >> $wp_config\n",
          "echo \"define('WPLANG'            , '');\" >> $wp_config\n",
          "echo \"define('WP_DEBUG'          , false);\" >> $wp_config\n", 
          "echo \"\\$table_prefix  = 'wp_';\" >> $wp_config\n",
          "echo \"if ( !defined('ABSPATH') )\" >> $wp_config\n",
          "echo \"    define('ABSPATH', dirname(__FILE__) . '/');\" >> $wp_config\n",
          "echo \"require_once(ABSPATH . 'wp-settings.php');\" >> $wp_config\n",

t/cfn_json/WordPress_Single_Instance2.json  view on Meta::CPAN


          "# Install Apache Web Server, MySQL, PHP and WordPress\n",
          "/opt/aws/bin/cfn-init -s ", { "Ref" : "AWS::StackId" }, " -r WebServer ",
          "    --region ", { "Ref" : "AWS::Region" }, " || error_exit 'Failed to run cfn-init'\n",

          "# Setup MySQL root password and create a user\n",
          "mysqladmin -u root password '", { "Ref" : "DBRootPassword" }, "' || error_exit 'Failed to initialize root password'\n",
          "mysql -u root --password='", { "Ref" : "DBRootPassword" }, "' < /tmp/setup.mysql || error_exit 'Failed to create database user'\n",

          "# Setup correct file ownership\n",
          "chown -R apache:apache /var/www/html/wordpress\n",
          
          "# Add keys and salts to the config file\n",
          "wp_config=/var/www/html/wordpress/wp-config.php\n",
          "GET https://api.wordpress.org/secret-key/1.1/salt/ >> $wp_config\n",
          "echo \"define('WPLANG'            , '');\" >> $wp_config\n",
          "echo \"define('WP_DEBUG'          , false);\" >> $wp_config\n", 
          "echo \"\\$table_prefix  = 'wp_';\" >> $wp_config\n",
          "echo \"if ( !defined('ABSPATH') )\" >> $wp_config\n",
          "echo \"    define('ABSPATH', dirname(__FILE__) . '/');\" >> $wp_config\n",
          "echo \"require_once(ABSPATH . 'wp-settings.php');\" >> $wp_config\n",

t/cfn_json/bees-with-machineguns.json  view on Meta::CPAN

                                                       "if [ $? -eq 0 ]\n",
                                                       "then\n",
                                                       "  mkdir /home/ec2-user/swarm-results\n",
                                                       "  /home/ec2-user/create-keypair > /home/ec2-user/swarm-results/create-keypair.log 2>&1\n",
                                                       "  bash /home/ec2-user/create-swarm > /home/ec2-user/swarm-results/create-swarm.log 2>&1\n",
                                                       "  sleep 45 # Allow EC2 instances to fully come up\n",
                                                       "  bash /home/ec2-user/start-swarm > /home/ec2-user/swarm-results/start-swarm.log 2>&1\n",
                                                       "  bash /home/ec2-user/kill-swarm > /home/ec2-user/swarm-results/kill-swarm.log 2>&1\n",
                                                       "  /home/ec2-user/delete-keypair > /home/ec2-user/swarm-results/delete-keypair.log 2>&1\n",
                                                       "  tar cvf /home/ec2-user/swarm-results.tar.gz /home/ec2-user/swarm-results/*\n",
                                                       "  chown ec2-user:ec2-user -R /home/ec2-user/swarm-results\n",
                                                       "  chown ec2-user:ec2-user /home/ec2-user/swarm-results.tar.gz\n",
                                                       "  aws put ",  { "Ref": "ResultBucket" }, "/swarm-results.tar.gz /home/ec2-user/swarm-results.tar.gz\n",
                                                       "else\n",
                                                       "  exit 1\n",
                                                       "fi\n"]]
                                },
                                "mode": "000755",
                                "owner": "ec2-user",
                                "group": "ec2-user"
                            },
                            "/home/ec2-user/wait-for-elb" : {



( run in 1.646 second using v1.01-cache-2.11-cpan-71847e10f99 )