Last active
August 29, 2015 14:11
-
-
Save jeqo/62b74a9ed65d575d91b4 to your computer and use it in GitHub Desktop.
Running Oracle BPM 12c on AWS
This file contains 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
keys: | |
access_key_id: | |
secret_access_key: | |
key_pair_location: |
This file contains 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
box: | |
name: bpm12c-machine | |
disk_size: 30 | |
base_location: C:/dev/jeqo/personal/aws/aws.box | |
additional_swap: 6100 | |
chef: | |
repo_location: C:/dev/jeqo/chef-repo |
This file contains 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/sh | |
# size of swapfile in megabytes | |
swapsize=$1 | |
# does the swap file already exist? | |
grep -q "swapfile" /etc/fstab | |
# if not then create it | |
if [ $? -ne 0 ]; then | |
echo 'swapfile not found. Adding swapfile.' | |
fallocate -l ${swapsize}M /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo '/swapfile none swap defaults 0 0' >> /etc/fstab | |
else | |
echo 'swapfile found. No changes made.' | |
fi | |
# output results to terminal | |
df -h | |
cat /proc/swaps | |
cat /proc/meminfo | grep Swap |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require "yaml" | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Load properties files | |
box_props = YAML.load_file("box.properties") | |
aws_props = YAML.load_file("aws.properties") | |
# Basic metadata | |
config.vm.box = "#{box_props['box']['name']}" | |
config.vm.box_url = "file://#{box_props['box']['base_location']}" | |
# AWS Configuration | |
config.vm.provider :aws do |aws, override| | |
aws.access_key_id = "#{aws_props['keys']['access_key_id']}" | |
aws.secret_access_key = "#{aws_props['keys']['secret_access_key']}" | |
aws.keypair_name = "jeqo" | |
aws.instance_type = "m3.medium" | |
aws.region = "sa-east-1" | |
aws.availability_zone = "sa-east-1a" | |
aws.ami = "ami-0511a418" | |
override.ssh.username = "ec2-user" | |
override.ssh.private_key_path = "#{aws_props['keys']['key_pair_location']}" | |
aws.tags = { | |
'Name' => box_props['box']['name'] | |
} | |
aws.block_device_mapping = [{ | |
'DeviceName' => '/dev/sda1', | |
'Ebs.VolumeSize' => box_props['box']['disk_size'] | |
}] | |
aws.security_groups = "jeqo-group" | |
config.ssh.pty = true | |
end | |
# Install Chef Client | |
config.omnibus.chef_version = :latest | |
# Increase Swap size | |
config.vm.provision "shell" do |s| | |
s.path = "increase_swap.sh" | |
s.args = "'#{box_props['box']['additional_swap']}'" | |
end | |
# Run Provisioning with Chef | |
config.vm.provision "chef_client" do |chef| | |
chef.chef_server_url = "https://api.opscode.com/organizations/jeqo" | |
chef.validation_client_name = "jeqo-validator" | |
chef.validation_key_path = "#{box_props['chef']['repo_location']}/.chef/jeqo-validator.pem" | |
chef.node_name = "#{box_props['box']['name']}" | |
chef.add_role "nfs-client" | |
chef.add_role "oracle_db-xe" | |
chef.add_role "demo-bpm_bam-12c" | |
chef.json = { | |
"nfs-client" => { | |
"server-host" => "127.0.0.1" | |
}, | |
"oracle-xe" => { | |
"url" => "file:///data/oracle-xe/oracle-xe-11.2.0-1.0.x86_64.rpm" | |
}, | |
"bpm_qs-12c" => { | |
"url" => "file:///data/oracle-fmw/bpm_qs-12c/fmw_12.1.3.0.0_bpmqs_Disk1_1of1.zip" | |
} | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment