You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile in an empty directory with the following content:
You should install VirtualBox and Vagrant before you start.
You should create a Vagrantfile in an empty directory with the following content:
| import logging | |
| import logging.config | |
| logging.dictConfig({ | |
| 'version': 1, | |
| 'disable_existing_loggers': False, | |
| "formatters": { | |
| "standard": { | |
| "format": '%(asctime)s %(name)s %(levelname)s %(message)s' | |
| } |
| #!/bin/sh | |
| ROLENAME=$(curl http://169.254.169.254/latest/meta-data/iam/security-credentials/ -s) | |
| KeyURL="http://169.254.169.254/latest/meta-data/iam/security-credentials/"$ROLENAME"/" | |
| wget $KeyURL -q -O Iam.json | |
| KEYID=$(grep -Po '.*"AccessKeyId".*' Iam.json | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/AccessKeyId://g') | |
| SECRETKEY=$(grep -Po '.*"SecretAccessKey".*' Iam.json | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/SecretAccessKey://g') | |
| SECURITYTOKEN=$(grep -Po '.*"Token".*' Iam.json | sed 's/ //g' | sed 's/"//g' | sed 's/,//g' | sed 's/Token://g') | |
| rm Iam.json -f |
| #!/bin/bash | |
| set -e | |
| reset=$(tput sgr0) | |
| green=$(tput setaf 76) | |
| blue=$(tput setaf 25) | |
| red=$(tput setaf 1) | |
| info() { |
| # | |
| # Cutom Environment Variables for Tomcat | |
| # | |
| ############################################ | |
| export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre | |
| export PATH=${JAVA_HOME}/bin:${PATH} | |
| ############################################ | |
| # | |
| # JAVA_OPTS |
| +---------------------------------------------------------------+ | |
| | * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * | | |
| +---------------------------------------------------------------+ | |
| \ | |
| \ ^ /^ | |
| \ / \ // \ | |
| \ |\___/| / \// .\ | |
| \ /V V \__ / // | \ \ *----* | |
| / / \/_/ // | \ \ \ | | |
| @___@` \/_ // | \ \ \/\ \ |
| +---------------------------------------------------------------+ | |
| | * * * PUSH REJECTED BY EVIL DRAGON BUREAUCRATS * * * | | |
| +---------------------------------------------------------------+ | |
| \ | |
| \ ^ /^ | |
| \ / \ // \ | |
| \ |\___/| / \// .\ | |
| \ /V V \__ / // | \ \ *----* | |
| / / \/_/ // | \ \ \ | | |
| @___@` \/_ // | \ \ \/\ \ |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| $master_cpus = 2 | |
| $master_memory = 2048 | |
| $num_workers = 3 | |
| $worker_cpus = 4 | |
| $worker_memory = 4096 | |
| $common_script = <<-SCRIPT |
| def getProjectName() { | |
| return 'JenkinsPipeline' | |
| } | |
| def getJDKVersion() { | |
| return 'jdk1.8.0_101' | |
| } | |
| def getMavenConfig() { | |
| return 'maven-config' |
| # Simple JBoss7 helper functions | |
| # set var to jboss home dir | |
| JBOSS_HOME="/usr/local/jboss/jboss-as-web-7.0.2.Final" | |
| #Start BBoss | |
| alias jboss-start="sudo $JBOSS_HOME/bin/standalone.sh" | |
| #Stop JBoss | |
| alias jboss-stop="sudo $JBOSS_HOME/bin/jboss-admin.sh --connect command=:shutdown" |