Deployment Using Cloudformation Template

Version 9.1 by Sanchita Singh on 2021/08/11

What You Will Build

Using this Clodformation template you'll be provisioning these resources in your AWS account. for more details on sytem Design check Design Page

  • A virtual private cloud (VPC) that is configured across two Availability Zones. For each Availability Zone, this template provisions one public subnet and one private subnet, according to AWS best practices.
  • In the public subnets, managed network address translation (NAT) gateways to provide outbound internet connectivity for instances in the private subnets.
  • In the private subnets, amazon Elastic File System(EFS), which provides simple, scalable file storage for Xwiki files, Amazon Aurora database instances running MySQL and Elastic Container Service(ECS) fargate service .
  • An AWS Loadbalancer, which you will connect to using the DNS provided at the end of installation. 
  • An AWS Identity and Access Management (IAM) role to enable AWS resources created through the Template to access other AWS resources when required.

Deployment Options

The Clodformation Template and CDK will install XWiki with MySQL. You can choose which of the following versions to deploy of XWiki.

  1. Long-term support: This version is the latest stable version from the last XWiki cycle. This is the most stable version and is recommended to use in production.
  2. Stable: This version is the latest stable version from the current XWiki cycle. This is the version recommended if you wish to try out the new features from the cycle.
    Note: you can also choose a specific version other than mentioned above. But it is not recommended.

Prepare AWS Account

  • One of the obvious requirements is having an AWS account, So if you don’t have one already, you can create one at https://aws.amazon.com/ by following the on-screen instructions. When you create an AWS account, AWS automatically sign-up for all the services including the ones we are gonna use for XWiki. You are charged only for the services that you use and only for the time period you use them.
    IMPORTANT: make sure you are using root user otherwise you can get errors related to permissions regarding resource creation.
  • We will be creating a virtual private cloud (VPC) for deploying the XWiki in. The default quota for the number of max VPCs in a region is 5. But you can extend them up to 100 by going here https://console.aws.amazon.com/support/home?#/case/create?issueType=service-limit-increase&limitType=vpc. So, if there are already 5 VPCs in the region you are deploying the instance, request for a quota increase. It can take a few days for the new service quota to become effective. 
  • Now, Select the region (on the top right) you want to deploy XWiki in from the navigation bar.

    region.png

    Consider choosing a region closest to your data center or corporate network to reduce network latency between systems running on AWS and the systems and users on your corporate network

Launching The Cloudformation Templete

  • After logging in to your AWS account, click on this link  https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/template?stackName=XWiki&templateURL=https://xwiki-aws-cf.s3.amazonaws.com/template/xwiki.template.json
  • Select “Template is ready”, for the prepare template option.

    create_stack_prerequisite_AWS_cf.png

  • For, Specify template, It should be auto-filled. If not, select “Amazon S3 URL” for the Template source. And copy-paste this URL of the public S3 bucket https://xwiki-aws-cf.s3.amazonaws.com/template/xwiki.template.json and click on NEXT

    specify_template_aws_cf.png

  • The default stack name should be XWiki, but you can change it to whatever you want.

    stack_name_aws_cf.png

  • For the Parameters, you need to give the docker name for the XWiki version you want to install. If you want to install a Stable version type xwiki:stable-mysql-tomcat or else if you want long-term-support (LTS) version, type xwiki:lts-mysql-tomcat. For more information on what stable and LTS is, refer to deployment option section. The click on NEXT

    parameters_aws_cf.png

  • Add tags if you want to, Will make it easier to manage, search for, and filter resources

    tags_aws_cf.png

  • Leave other options on the page as default (or you can configure specifics if you want) and click NEXT
  • Make sure to select the check-box for acknowledging that AWS CloudFormation might create IAM resources. And click on CREATE STACK

    capability_IAM_aws_cf.png

  • Monitor the status of the stack. When the status is CREATE_COMPLETE, Check the "OUTPUT" tab for the loadbalancer DNS. Connect to the DNS to configure your newly hosted XWiki. For more information about XWiki and how to configure it, refer to official documentation https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/GettingStarted/

Github Repository

You can visit our GitHub repository to download the CDK code for this deployment to modify it for your needs and to post your comments,

Troubleshooting

  • If during stack creation your stack is getting rollbacked, check the EVENT tab, there you can the reason due to which some of the resources couldn’t get provisioned. One of the possible errors that you can get is ‘ResourceLimitExceeded’. You get this error when ther resource you are trying to create already reached it quota limit. But you can request to increase quota in your AWS account. It can take a few days for the new service quota to become effective. For more details on how to request quota increase, refer to, https://aws.amazon.com/premiumsupport/knowledge-center/resourcelimitexceeded-sagemaker/
  • When after filling the details you click on CREATE STACK , On the top of the screen an error might flash saying any “Unrecognised Resources”. You are getting this error because you are creating the stack in a region where not all the resources needed are available. To solve this change the region to some other nearest region to your center.

    unrecognised_resource_error_aws_cf.png

Tags:
   

Get Connected