Deploying HCL Domino Applications to AWS with Build Manager

By Larry Barker

The release of HCL Domino v12, combined with Teamstudio Build Manager v9.0, opens up some interesting possibilities for using new features in both products to integrate HCL Domino apps into DevOps strategies using modern platforms and tools. This is the third in a series of articles that describes some options for how to do that.

Our previous DevOps for Domino article explained the basic concepts and mechanisms used by Teamstudio Build Manager to help facilitate modern deployment and DevOps practices within the Domino application release cycle.   There are many possible build and promotion steps available in various configurations & approaches that will help you get your Domino template designs from Development through to Production in a repeatable and controlled manner. 

In today’s article we aim to take this a step further and look at a few of the specific steps and approaches we can use to deploy an example application into an on-demand provisioned test stack on Amazon Web Services (AWS).

Release Paths and Steps:

If we expand upon our previous release model by moving our Test and Production environments onto AWS we can use services such as Cloudformation to deploy any required cloud infrastructure alongside our HCL Domino application.

Let’s assume that our desired Domino application version has already transitioned into our Template Registry via a previous Build promotion (Step #1 in the model above). Our example will concentrate on a promotion path moving the application through into our target TEST environment on AWS (Step #2 in the model).  However, nothing stops you from applying this approach to any target environment and adding your own additional steps based on your own requirements.

Pipeline: Template Registry to TEST (Promotion Paths)

In general, promotion paths are more complex than this, as they will incorporate all of the preparatory steps required to package your Domino application template into a successful release based on the operational context of your target environment.

Example Build Manager Promotion Path

With our example promotion to TEST we have 4 key components to configure and manage:

  • Pre-Release promotion steps

  • Provisioning on-Demand AWS infrastructure

  • Domino Directory and Server configuration via One-Touch setup

  • Application Release & Bootstrapping app-specific configuration and/or test data.

Provisioning AWS Infrastructure

Using the Build Manager “Run Command” step, we initiate the creation of our AWS CloudFormation stack via the AWS Command Line Interface (CLI).  Command initiation is straightforward as we can build out our services with a single line.  The complexity comes with composing an appropriate .yml file specifying all of our infrastructure attributes.

Build Manager Run Command Step: Provision AWS Stack via CloudFormation

In this case, we are instructing AWS to launch a stack “TEST” based on the “TEST.yml” configuration file.  Based on this setup file we:

  • Launch an AWS t2.small instance based on a custom AMI within our desired availability zone.

  • Assign an Elastic IP to our new instance.

  • Create Route53 DNS & PTR records.

  • Tag all created resources for easy identification/billing purposes.

Parameters:

  KeyName:
    Description: Teamstudio ExampleApp KeyName
    Type: AWS::EC2::KeyPair::KeyName
    Default: ExampleApp-KeyPair

Resources:
  Test01:
    Type: AWS::EC2::Instance
    Properties:
      AvailabilityZone: ap-northeast-1a
      ImageId: ami-01dbcd1e15da877e0
      InstanceType: t2.small
      KeyName: !Ref KeyName
      SecurityGroupIds:
        - sg-0a9de03f30ddbg208
      SubnetId: subnet-08e337425g7de8874
      UserData:
        
      Tags: 
      - Key: Name
        Value: demo.ExampleApp
          
  Test01EIP:
    Type: AWS::EC2::EIP
    Properties:
      InstanceId: !Ref Test01
      Tags: 
      - Key: Name
        Value: demo.ExampleApp 

  Test01DNS:
    Type: AWS::Route53::RecordSet
    Properties:
      HostedZoneName: Teamstudio.com.
      Comment: DNS name for my instance.
      Name: test01.teamstudio.com.
      Type: A
      TTL: '300'
      ResourceRecords:
        - !Ref Test01EIP
  
  Test01DNSPTR:
    Type: AWS::Route53::RecordSet
    Properties:
      HostedZoneName: teamstudio.com.
      Comment: DNS name for my instance.
      Name: test01.teamstudio.com.
      Type: PTR
      TTL: '300'
      ResourceRecords:
        - !Ref Test01EIP    

To create your own CloudFormation Stack templates there are several resources available.  You can reference the AWS CloudFormation Templates site to find examples for the setup and configuration of a number of AWS services.   There is also a very handy CloudFormation Designer available within the CloudFormation management console within your AWS services account.

Prerequisites:  You will need to have the AWS CLI installed on the Build Manager promotion workstation as well as a base AMI image to use for your instance. 

Domino Directory & Server Setup

There are a few different approaches you can take with this step.  Some may prefer to bake the Domino installation files into a custom AMI (as we have done with our example) or take another route and use bash/batch scripts to obtain all the needed files at run-time prior to initiating the Domino One-Touch setup.

At this point in the release we will invoke one-touch Domino setup using another Build Manager “Run Command” step as follows:

Build Manager Run Command Step: Initiate Domino One-Touch Setup

You can refer to the HCL one-touch setup documentation for details on how to construct the correct command formats for invoking setup with a JSON file here.  In this case we are invoking a one-touch Domino setup using the “domino_setup.json” parameters file via SSH to our instance, which enables us to:

  • Specify Domino Domain parameters.

  • Assign a HostName matching what has already been provisioned to Route53 in our earlier AWS step.

  • Specify Admin account properties.

  • Additional Notes.ini entries.

  • Specify initial server tasks.

  • ID Vault setup.

Please see the HCL Documentation for specific details on what parameters are currently available.

Example HCL Domino JSON file used to provision TEST deployment server

At this point in our deployment, we will have all of our underpinning AWS infrastructure in place within our TEST environment and a newly provisioned Domino server. This extends the traditional benefits of Build Manager usage in your HCL Domino release processes to include the underlying operational components helping to bring into practice consistent, repeatable promotions.

What's Next?

Our next challenge is to get the latest version of our application out of our template repository and deployed onto the new infrastructure. Along with transitioning our new template version into TEST, we will need to bootstrap our application with some test documentation and an initial configuration. There are a few ways in which we can accomplish this with a few additional Build Manager steps and further customization to our Domino setup JSON parameters file. We will dig into all this in our next article.