UrbanCode Deploy is a tool for automating application deployments through the different stages of a release typically referred to as the deployment pipeline.
The deployment pipeline is analogous to a production line in a factory. UrbanCode Deploy acts like the conveyor belt in a production line which moves the product between stations. With UrbanCode Deploy the stations are the stages in the deployment pipeline.
For some organizations the failure or slowing down of the deployment pipeline can have significant implications. Deploying UrbanCode Deploy on AWS allows the organization to take advantage of the scaling and high availabilty features that AWS provides to create a resilient and scalable deployment pipeline..
UrbanCode Deploy Architecture
Urban Code Deploy Architecture is made up of 3 tiers
Service tier - This tier consists of a web server and application server providing workflow, agent management, deployment, inventory, security, and other services. The browser based GUI for UrbanCode Deploy is a Rich Internet Application (RIA) that communicates with the Services tier using REST.
Data tier - The Data tier consists of a Relational database and a file store. The Relational Database contains configuration and runtime data. UrbanCode deploy supports Derby, Oracle, SQL Server and MySQL databases. The File store (CodeStation) contains logs and other project artifacts like files, images, databases, configuration materials,etc.
Agents - The agents run on the host machine targeted for deployments. The Deployments are orchestrated by the services tier and the agents perform the actual deployment steps on the host machine. The server-agent communication is done with JMS
The diagram below illustrates the reference architecture for a multi datacenter implementation for UrbanCode Deploy using AWS
1. Setup a Virtual Private Cloud (VPC) - A VPC allows you to define a virtual network in AWS which is logically isolated from other virtual networks in AWS. It supports edefining your IP address range, subnets, route tables, gateways and security for your virtual network. The VPC can be connected to an on premises network through a VPN connection or AWS Direct Connect. AWS Direct Connect supports establishing a private dedicated network connection from your premises to AWS. For the reference architecture we would use a VPC that consist of public and private subnets with a VPN connection the on premises network.
2. Setup Service Tier using Elastic Compute (EC2) - UrbanCode Deploy's services tier consists of a web server and application server providing workflow engine, security services along with user interface, component and application configuration tools. The service tier would run on an virtualized server in the VPC. AWS EC2 provides the compute service and supports the provisioning of virtualized servers from a number of operating systems and server configurations (CPU, RAM). The EC2 instances can be based of AWS preconfigured or custom Amazon Machine Images (AMIs) . The service tier would run in an instance based off a custom AMI that has UrbanCode Deploy installed on it.
3. Setup Database Tier using Relational Database Service (RDS) - Using RDS the managed database service to implement the data tier would provide a resilient and scalable implementation. RDS supports provisioning of MYSQL, Oracle, SQL Server and Postgres database servers, automatically patches and backs up the databases it also manages replication of databases with built in automated failover support and provides the ability to scale the database's compute resources or storage capacity through a single api call or a few click from the console.
4. Relocate CodeStation to Simple Storage Service (S3) - A highly available implementation of Urban Code Deploy CodeStation (File Store) would need be accessible to all the service tier Instances. S3 is a reliable low-latency object storage that would house the CodeStation artifcats. The CodeStation artifacts would be stored as Objects in a an S3 bucket. The object in S3 are typically accessed through a URI to present the S3 bucket containing CodeStation artifacts as a mountable filesystem to the Instances running the Service Tier. S3FS would need to be installed on the instances and used to mount the bucket as a filesystem.
5 Setup Load Balancing and Auto Scaling . Using a load balancer to front the services tier would make UrbanCode Deploy resilient to a service tier failure and handle any surges in incoming requests through distributing the request to a number of service tier instances. AWS 's Elastic Load Balancing service automatically distributes incoming request across EC2 Instances while AWS's auto scaling service automatically increases or reduces the number of EC2 instances running based on demand. Using Elastic Load Balancing with auto scaling makes it possible to route requests to a dynamically changing number of services tier instances based on demand or user defined policies.
In the next series of blog entries will walk through the implementation of the above steps on AWS