Batch script to start Confluence and JIRA on Amazon EC2 and update the dynamic IP for a domain hosted with ZoneEdit.com
Ads by Google
Confluence, JIRA on Amazon EC2 and ZoneEdit
In my previous post I described how to hook up your Amazon EC2 server to DynDNS. And as I mentioned then, if you install stuff on the server, you’ll need to create a new image before you reboot. Otherwise, all the changes will be lost.
As a workaround to that problem, instead of DynDNS, you can signup for an account with ZoneEdit.com and use the script below to start your Confluence/JIRA Amazon server with a batch file which will also update your ZoneEdit.com dynamic zone record. This is just an extended version of the Instant Atlassian Start/Stop script that I did previously.
How it works
The script is using the instant atlassian tool.The batch file
- records the output to a file start-log.txt in the same directory with the script.
- reads the file back and finds the amazon URL
- pings the URL to determine the IP address
- connects to ZoneEdit with wget and updates the zone file.
What you need
- Instant Atlassian tool
- AWS Access Key ID and AWS Secret Access Key
- AWS Volume ID
- Account with zoneedit.com
- ZoneEdit Username and Password
- Wget for Windows
- The Script
- Create Desktop Shortcut
- How to Use
Instant Atlassian tool
You would have this already on your computer if you followed these Confluence/JIRA Installation Instuctions
AWS Access Key ID and AWS Secret Access Key
You can get these from your Amazon AWS account.
AWS Volume ID
Login to AWS Management Console again and get the Volume ID for your instance. You’ll find it in the “Volumes” section:
Account with ZoneEdit.com
This is simple. Go to zoneedit.com and signup for an account. You can have 5 domains hosted with ZoneEdit for free. Please note that you can only use a full domain name. Unline DynDNS, zoneedit does not provide third-level subdomains (e.g., username.zoneedit.com). If you don’t have a spare domain that you can use, you can ask your DNS manager to delegate a subdomain to ZoneEdit or register a new domain, cheap. To add a domain to ZoneEdit, login to your account and click “Add Zones” at the top, then “Start Editing Zone” button at the bottom. Then click on “IP Addresses” link and add a dummy IP: type “www” in the “Name” field and “10.10.10.10” in the “Numeric IP” field. Click “Yes” to confirm that “Only www will be used”. The dummy IP will change to your Amazon EC2 IP when you run this script.
ZoneEdit Username and Password
Take note of your ZoneEdit username and password when you sign up.
Wget for Windows
To update ZoneEdit, we use wget for windows, it’s a little command-line program for accessing web sites and transferring files, normally used with Linux. Download Wget for Windows on this site. Unzip the file and put it in the same directory with your Instant Atlassian java file.
Copy the code below, select all (Ctrl-A) and copy (Ctrl-C), enter your details and save is as a text file (I saved mine in the same directory with other EC2 stuff, e.g., c:EC2) You can name it something like start-stop.bat You’ll need to edit it to include your EC2 and ZoneEdit details.
Create Desktop Shortcut
Go to the folder where you saved the file (e.g., c:EC2), right-click on the file that you created and select “Send To” > “Desktop (Create Shortcut)”.
How to Use
That’s it! Now you can start Confluence and JIRA on Amazon EC2 right from your desktop and the scrip update the IP of your domain that is delegated to ZoneEdit.. Double-click and type 1 to start or 2 to stop (pause).
- Start & Stop scripts for Confluence and JIRA on Amazon EC2 without ZoneEdit.
- Amazon EC2 with DynDNS – How-To.
- Confluence and JIRA for $5 each!
Looking For More Information?
Ads by Google
The review "Confluence and JIRA on Amazon EC2: Hook Up to ZoneEdit" was last updated on 22/05/2009.