├── bootstrap.sh ├── README.md ├── LICENSE ├── sninstaller.xml └── cloudformation.json /bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir /tmp/cachedistr 3 | cd /tmp/cachedistr 4 | iptables -I INPUT 5 -p tcp -m tcp --dport 1972 -j ACCEPT 5 | iptables -I INPUT 6 -p tcp -m tcp --dport 57772 -j ACCEPT 6 | service iptables save 7 | service iptables restart 8 | wget https://mywebsite.com/cache-2015.2.1.705.0-lnxrhx64.tar.gz 9 | wget https://mywebsite.com/sninstaller.xml 10 | 11 | tar -zxvf cache-2015.2.1.705.0-lnxrhx64.tar.gz 12 | 13 | ISC_PACKAGE_UNICODE="Y" ISC_PACKAGE_INSTANCENAME="CACHE" ISC_PACKAGE_INSTALLDIR="/usr/cache" ISC_INSTALLER_MANIFEST="/tmp/cachedistr/sninstaller.xml" ./cinstall_silent 14 | 15 | wget https://mywebsite.com/cache.key 16 | cp cache.key /usr/cache/mgr/cache.key 17 | csession CACHE -UUSER "##class(%SYSTEM.License).Upgrade" 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AWSCacheDeployment 2 | Collection of scripts for Automated deployment of InterSystems Caché instances into the Amazon cloud 3 | 4 | Scripts would provision three AWS instances with RedHat linux, install Caché on each instance and perform initial configuration of the instance. 5 | 6 | Prerequisites - you need to provide your own web server and/or Amazon S3 bucket to store distribution and the script/key files. 7 | 8 | Replace 'https://mywebsite.com/' in cloudformation.json and bootstrap.sh with your own website address. 9 | 10 | You also need to replace "KeyName" : "mykey" with the name of your own keypar. 11 | 12 | Package content: 13 | 14 | cloudformation.json Amazon Cloud Formation template that provisions three RedHad Linux instances and kicks in initial instance bootstrapping with bootstrap.sh. 15 | 16 | bootstrap.sh opens ports in IPTABLE and performs Caché installation with Installer Manifest and cache.key file. 17 | 18 | sninstaller.xml performs initial Caché configuration, so it is ECP-ready. 19 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 a-data 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /sninstaller.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %RegisteredObject 5 | 63852,47866.843237 6 | 63852,47866.843237 7 | 8 | 9 | INSTALLER 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ]]> 21 | 22 | 23 | 24 | 1 25 | %Status 26 | 32 | 33 | 34 | 35 | 1 36 | 1 37 | objectgenerator 38 | 39 | %Status 40 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /cloudformation.json: -------------------------------------------------------------------------------- 1 | { 2 | "AWSTemplateFormatVersion" : "2010-09-09", 3 | "Description" : "", 4 | "Parameters" : { 5 | }, 6 | "Resources" : { 7 | "InstanceSecurityGroup" : { 8 | "Type" : "AWS::EC2::SecurityGroup", 9 | "Properties" : { 10 | "GroupDescription" : "Default Cache Ports", 11 | "SecurityGroupIngress" : [ 12 | { "IpProtocol" : "tcp", "FromPort" : "22", "ToPort" : "22", "CidrIp" : "0.0.0.0/0"}, 13 | { "IpProtocol" : "tcp", "FromPort" : "1972", "ToPort" : "1972", "CidrIp" : "0.0.0.0/0"}, 14 | { "IpProtocol" : "tcp", "FromPort" : "57772", "ToPort" : "57772", "CidrIp" : "0.0.0.0/0"} 15 | ] 16 | } 17 | }, 18 | "MASTER" : { 19 | "Type" : "AWS::EC2::Instance", 20 | "Properties" : { 21 | "Tags":[{"Key":"Name", "Value":"MASTER"}], 22 | "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], 23 | "KeyName" : "mykey", 24 | "BlockDeviceMappings": [ 25 | { 26 | "DeviceName": "/dev/sda1", 27 | "Ebs": { 28 | "VolumeSize": "200", 29 | "VolumeType": "io1", 30 | "Iops": "2000" 31 | } 32 | } 33 | 34 | ], 35 | "ImageId" : "ami-a25415cb", 36 | "InstanceType": "m1.large", 37 | "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ 38 | "#!/bin/bash -ex", "\n", 39 | "wget https://mywebsite.com/bootstrap.sh","\n", 40 | "sh bootstrap.sh","\n" 41 | ] ] } } 42 | } 43 | }, 44 | "SIDEKICK1" : { 45 | "Type" : "AWS::EC2::Instance", 46 | "Properties" : { 47 | "Tags":[{"Key":"Name", "Value":"SIDEKICK1"}], 48 | "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], 49 | "KeyName" : "mykey", 50 | "ImageId" : "ami-a25415cb", 51 | "InstanceType": "m1.large", 52 | "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ 53 | "#!/bin/bash -ex", "\n", 54 | "wget https://mywebsite.com/bootstrap.sh","\n", 55 | "sh bootstrap.sh","\n" 56 | ] ] } } 57 | } 58 | }, 59 | "SIDEKICK2" : { 60 | "Type" : "AWS::EC2::Instance", 61 | "Properties" : { 62 | "Tags":[{"Key":"Name", "Value":"SIDEKICK2"}], 63 | "SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], 64 | "KeyName" : "mykey", 65 | "ImageId" : "ami-a25415cb", 66 | "InstanceType": "m1.large", 67 | "UserData" : { "Fn::Base64" : { "Fn::Join" : ["", [ 68 | "#!/bin/bash -ex", "\n", 69 | "wget https://mywebsite.com/bootstrap.sh","\n", 70 | "sh bootstrap.sh","\n" 71 | ] ] } } 72 | 73 | } 74 | } 75 | }, 76 | "Outputs" : { 77 | "MASTERURL": { 78 | "Description": "Access MASTER Management Portal at the following URL.", 79 | "Value": { "Fn::Join": [ "", 80 | [ "http://", { "Fn::GetAtt": [ "MASTER", "PublicDnsName" ] }, ":57772/csp/sys/UtilHome.csp" ] 81 | ] } 82 | } 83 | 84 | } 85 | 86 | } 87 | --------------------------------------------------------------------------------