Split CloudFormation Stacks

This page tells you how to convert a master stack system into a split stack system.

Rationale

A Datomic Cloud system comprises at least 2 CloudFormation stacks per AWS best practice guidelines:

  • one storage resource stack
  • one or more compute stacks

In the AWS Marketplace install, these stacks are nested under a master stack. This master stack is necessary for Marketplace integration, but it is not necessary for Datomic itself. More importantly, the master stack makes various operational tasks more difficult.

For production operation, you should use a split stack system, i.e. separate top-level storage and compute stacks.

There are two ways to run a split stack system:

  • Create a split stack system from scratch.
  • Convert a master stack system into a split stack system, per the instructions below.

How To Split Datomic Stacks

The following steps convert a Datomic system from the master stack setup to the split stack setup. There are three steps:

Delete the master stack

Deleting the master stack will make your system temporarily unavailable, but does not harm your data!

  1. Select the root stack for your system in the CloudFormation console. The root stack will have a Stack Name that is the same as your system name.
  2. Click "Delete" from the menu bar. Confirm this in the Delete Stack popup, then wait for the stack deletion to complete. This can take 10 minutes or more.

Recreate the storage stack

This step creates a storage stack that utilizes the storage from the original master template.

  1. Choose "Create Stack", and then paste in the template URL for the Storage Stack you want from the Releases Page.
  2. Click the Next button, and fill in the template's parameter values as specified below.

    StackName
    Enter your system name, i.e. the name of the stack you just deleted.
    Reuse existing storage
    Set this to "True".

    This CloudFormation Template creates a VPC in which to run Datomic Cloud. Configure the settings for the VPC in the VPC Configuration section. See the AWS VPC Guide for details on specifying the CIDR blocks. Unless you know you need to change the CIDR block settings, you should accept the default configuration.

    VPC CIDR block
    The CIDR block to assign to the VPC. Accept the defaults.
    First, Second, and Third CIDR Blocks.
    Datomic will configure three subnets in the VPC. These three CIDR Blocks must be subsets of the VPC CIDR Block, and they must not overlap with each other. Accept the defaults.
  3. Click the Next button to move to the "Options" screen. Leave all settings unchanged.
  4. Click the Next button to move to the "Review" screen. Under "Capabilities", click the checkbox stating "I acknowledge that AWS CloudFormation might create IAM resources with custom names."
  5. Click "Create" to launch the Storage stack.
  6. Wait for the template to report CREATE_COMPLETE. This can take up to 25 minutes. You can refresh the CloudFormation dashboard to see progress.

Recreate the compute stack

This step creates a primary compute stack that uses the storage stack from the previous step.

  1. Choose "Create Stack" a second time
  2. Go to Releases and click click the file icon for the compute release you wish to use. Selection between Solo and Production depends on factors explained in the Architecture document
  3. Click the Next button, and fill in the template's parameter values as specified below.
    StackName
    Use the name "$(System)-compute", where System is your system name.
    SystemName
    Enter your system name.
    AWS EC2 Key Pair
    The key pair to assign to compute nodes. Select a key pair for ssh access to nodes and the access gateway.
    Application Name
    If you supply the name of an existing application, this compute group will be a deployment group of that application. Otherwise, a new application will be created with the provided name.
    Environment Map
    Ion environment map.
    Preload Database
    All compute group instances will load this database when they start.
    Access Gateway Instance Type
    Choose a 'nano' instance type to start an access gateway for developer access. Choose a larger instance to enable analytics support.
    Existing IAM managed policy for node
    Optional. Leave this blank.
  4. Click the Next button to move to the "Options" screen. Leave all settings unchanged.
  5. Click the Next button to move to the "Review" screen. Under "Capabilities", click the checkbox stating "I acknowledge that AWS CloudFormation might create IAM resources with custom names."
  6. Click "Create" to launch the Compute stack.
  7. Verify that your upgraded system is available using the dashboard.
  8. (Optional) To allow developers to access the access gateway from outside the VPC, you must follow the steps to Allow Inbound Access Gateway Traffic. You must repeat these steps if you previously did them, as deleting the compute stack removes that access.