AWS Deployment
Deploy jambonz on AWS using EC2 instances and autoscaling
Prerequisites
jambonz is deployed on Amazon Web Services (AWS) using CloudFormation templates. You will need:
- An AWS account with appropriate permissions
- AWS CLI installed and configured with your credentials
- An AWS SSH key pair for your desired region
Generate and run the CloudFormation templates
The CloudFormation templates for deploying jambonz on AWS are available here.
- Clone the repository to your local machine.
- Decide on the AWS region you want to deploy in and the jambonz configuration (mini, medium, large)
- Run the
generate-cf.shscript to copy the EC2 amis to your account and generate the CloudFormation template - Follow the instructions generated to deploy the Cloudformation stack.
- Once the Cloudformation stack is created, follow the post-install steps outlined in the Post-Install Steps article to complete the setup.
- Generate a software license key as described in the Software Licensing article.
Example
Here is an example of generating a Cloudformation template for a jambonz-mini in us-west-1.
./generate-cf.sh================================================jambonz CloudFormation Generator================================================Checking AWS credentials...✓ Authenticated successfullyAccount ID: 376029039764User/Role: arn:aws:iam::376029039764:user/dhortonSelect deployment size:1) mini - Single EC2 instance with all components2) medium - Multi-tier deployment (SBC, Feature Server, Web/Monitoring, Recording)3) large - Fully separated architecture (SBC SIP, SBC RTP, FS, Web, Monitoring, Recording)Enter choice [1-3]: 2Selected: mediumSelect AWS region:Available regions:1 us-east-12 us-east-23 us-west-14 us-west-25 ca-central-16 ca-west-17 sa-east-18 mx-central-19 eu-central-110 eu-central-211 eu-west-112 eu-west-213 eu-west-314 eu-north-115 eu-south-116 eu-south-217 ap-south-118 ap-south-219 ap-east-120 ap-east-221 ap-southeast-122 ap-southeast-223 ap-southeast-324 ap-southeast-425 ap-southeast-526 ap-southeast-627 ap-southeast-728 ap-northeast-129 ap-northeast-230 ap-northeast-331 me-central-132 me-south-133 il-central-134 af-south-1Enter region name (e.g., us-east-1): eu-west-3Selected region: eu-west-3================================================Reading public AMI IDs from mappings...================================================Querying version tags from public AMIs...This will take a moment - querying 4 AMI(s)...Querying version tag for SbcAmi (ami-0eb29538f92008874)...✓ SbcAmi: ami-0eb29538f92008874 (version: v10.0.2)Querying version tag for FsAmi (ami-0e2ee4081c6393519)...✓ FsAmi: ami-0e2ee4081c6393519 (version: v10.0.2)Querying version tag for WebMonitoringAmi (ami-0d11651e060e40b7c)...✓ WebMonitoringAmi: ami-0d11651e060e40b7c (version: v10.0.2)Querying version tag for RecordingServerAmi (ami-0b0e1c42c96499cf2)...✓ RecordingServerAmi: ami-0b0e1c42c96499cf2 (version: v10.0.2)✓ All AMIs verified with proper JambonzVersion tagsDetected jambonz version: v10.0.2================================================Validating source AMI availability...================================================Checking that all source AMIs are ready to be copied...Checking SbcAmi (ami-0eb29538f92008874)...✓ AMI is availableChecking FsAmi (ami-0e2ee4081c6393519)...✓ AMI is availableChecking WebMonitoringAmi (ami-0d11651e060e40b7c)...✓ AMI is availableChecking RecordingServerAmi (ami-0b0e1c42c96499cf2)...✓ AMI is available✓ All source AMIs are available and ready to copy================================================Copying AMIs to your account...================================================This will take 5-15 minutes for same-region copying. Please be patient.Note: Keep this script running to automatically generate the CloudFormation template.Status updates every 30 seconds.Initiating 4 AMI copy operation(s) in parallel...Starting copy: SbcAmi (ami-0eb29538f92008874) version v10.0.2...✓ Copy initiated: ami-0751fc0bf773500d4Tagging AMI...✓ AMI tagged successfullyStarting copy: FsAmi (ami-0e2ee4081c6393519) version v10.0.2...✓ Copy initiated: ami-0e09b398f9595b24bTagging AMI...✓ AMI tagged successfullyStarting copy: WebMonitoringAmi (ami-0d11651e060e40b7c) version v10.0.2...✓ Copy initiated: ami-01d01d4eb80b18f29Tagging AMI...✓ AMI tagged successfullyStarting copy: RecordingServerAmi (ami-0b0e1c42c96499cf2) version v10.0.2...✓ Copy initiated: ami-0b81b0618f98c334bTagging AMI...✓ AMI tagged successfully✓ All 4 AMI copy operation(s) started in parallel================================================Waiting for AMI copies to complete...================================================Status updates every 30 seconds. This typically takes 5-15 minutes.Do not close this terminal or interrupt the script while AMI copies are in progress!Tip: You can also check progress in another terminal:aws ec2 describe-images --region eu-west-3 --image-ids ami-0751fc0bf773500d4 ami-0e09b398f9595b24b ami-01d01d4eb80b18f29 ami-0b81b0618f98c334b --query 'Images[*].[ImageId,Name,State]' --output table[Check #1] Elapsed: 0m 13sSbcAmi (ami-0751fc0bf773500d4): pendingFsAmi (ami-0e09b398f9595b24b): pendingWebMonitoringAmi (ami-01d01d4eb80b18f29): pendingRecordingServerAmi (ami-0b81b0618f98c334b): pendingProgress: 0/4 AMIs ready[Check #2] Elapsed: 0m 47sSbcAmi (ami-0751fc0bf773500d4): pendingFsAmi (ami-0e09b398f9595b24b): pendingWebMonitoringAmi (ami-01d01d4eb80b18f29): pendingRecordingServerAmi (ami-0b81b0618f98c334b): pendingProgress: 0/4 AMIs ready[Check #3] Elapsed: 1m 20s✓ SbcAmi (ami-0751fc0bf773500d4): available✓ FsAmi (ami-0e09b398f9595b24b): available✓ WebMonitoringAmi (ami-01d01d4eb80b18f29): available✓ RecordingServerAmi (ami-0b81b0618f98c334b): availableProgress: 4/4 AMIs ready================================================✓ All 4 AMI(s) are now available!================================================Total time: 83s (1m 23s)================================================Generating CloudFormation template...================================================✓ CloudFormation template generated: /Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/jambonz-selfhosting/cloudformation/jambonz-medium-eu-west-3.yamlValidating generated template...✓ Template is valid YAML================================================SUCCESS!================================================Copied AMI IDs (for your records):SbcAmi: ami-0751fc0bf773500d4FsAmi: ami-0e09b398f9595b24bWebMonitoringAmi: ami-01d01d4eb80b18f29RecordingServerAmi: ami-0b81b0618f98c334bGenerated CloudFormation template:/Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/jambonz-selfhosting/cloudformation/jambonz-medium-eu-west-3.yamlNext steps:Note: This template is 77680 bytes (CloudFormation has a 51,200 byte limit for direct usage).1. Upload template to S3 bucket:aws s3 cp /Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/jambonz-selfhosting/cloudformation/jambonz-medium-eu-west-3.yaml s3://<your-bucket>/jambonz-medium-eu-west-3.yaml2. Deploy using S3 URL:aws cloudformation create-stack \--region eu-west-3 \--stack-name jambonz-medium \--template-url https://<your-bucket>.s3.amazonaws.com/jambonz-medium-eu-west-3.yaml \--capabilities CAPABILITY_IAM \--parameters \ParameterKey=KeyName,ParameterValue=<your-key-name> \ParameterKey=URLPortal,ParameterValue=<your-domain>3. Or deploy via AWS Console (recommended for large templates):- Navigate to CloudFormation service in eu-west-3- Click 'Create stack'- Choose 'Upload a template file' and select: /Users/dhorton/beachdog-enterprises/beachdog-networks/git/jambones.org/jambonz-selfhosting/cloudformation/jambonz-medium-eu-west-3.yaml- Follow the wizard to configure parameters