Last modified by Vincent Massol on 2021/08/26

Hide last authors
Sanchita Singh 11.2 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc start="1" depth="6" numbered="false" scope="page"/}}
3 {{/box}}
Sanchita Singh 1.1 4
Sanchita Singh 11.2 5 {{warning}}
Vincent Massol 16.2 6 Installation on AWS is currently an XWiki Contrib project and not supported by the core XWiki Dev Team.
Sanchita Singh 11.2 7 {{/warning}}
8
9 = What You Will Build =
10
Vincent Massol 14.7 11 Using this CloudFormation Template you'll be provisioning these resources in your AWS account.
Sanchita Singh 11.2 12
Sanchita Singh 1.1 13 * 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.
14 * In the public subnets, managed network address translation (NAT) gateways to provide outbound internet connectivity for instances in the private subnets.
Sanchita Singh 14.4 15 * 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.
Vincent Massol 14.7 16 * An AWS Loadbalancer, which you will connect to using the DNS provided at the end of the installation.
17 * An AWS Identity and Access Management (IAM) role to enable AWS resources created through the template to access other AWS resources when required.
Sanchita Singh 11.2 18
19 = Deployment Options =
20
Vincent Massol 14.7 21 The CloudFormation Template and CDK will install XWiki with MySQL. You can choose which of the following versions to deploy of XWiki.
Sanchita Singh 11.2 22
Sanchita Singh 1.1 23 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.
24 1. 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.
25 Note: you can also choose a specific version other than mentioned above. But it is not recommended.
Sanchita Singh 11.2 26
27 = Prepare AWS Account =
28
Vincent Massol 14.8 29 * One of the obvious requirements is having an AWS account, So if you don’t have one already, you can [[create one>>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.
Sanchita Singh 1.1 30 IMPORTANT: make sure you are using root user otherwise you can get errors related to permissions regarding resource creation.
Vincent Massol 14.9 31 * 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>>https://console.aws.amazon.com/support/home?#/case/create?issueType=service-limit-increase&limitType=vpc]] up to 100. 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.
Sanchita Singh 1.1 32 * Now, Select the region (on the top right) you want to deploy XWiki in from the navigation bar.(((
33 {{image reference="region.png" width="600px"/}}
34 )))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
35
Vincent Massol 14.7 36 = Launching The CloudFormation Template =
Sanchita Singh 11.2 37
Vincent Massol 15.1 38 * Download the [[CloudFormation Template file>>https://raw.githubusercontent.com/xwiki-contrib/aws-xwiki-cloudformation/1.0/templates/xwiki.template.json]] to use.
Sanchita Singh 14.1 39 * 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>>https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/template]]
Sanchita Singh 11.2 40 * Select “Template is ready”, for the prepare template option.(((
41 {{image reference="create_stack_prerequisite_AWS_cf.png"/}}
Sanchita Singh 1.1 42 )))
Vincent Massol 14.2 43 * For, Specify template, Select the "Upload a template file" and upload the template file you just downloaded(((
44 {{image reference="specify-template-2.png"/}}
45 )))
Sanchita Singh 14.1 46 * Type the name you want to give your stack. For example XWiki.(((
Sanchita Singh 1.1 47 {{image reference="stack_name_aws_cf.png"/}}
48 )))
Sanchita Singh 11.2 49 * 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(((
Sanchita Singh 1.1 50 {{image reference="parameters_aws_cf.png"/}}
51 )))
Sanchita Singh 11.2 52 * Add tags if you want to, Will make it easier to manage, search for, and filter resources(((
Sanchita Singh 1.1 53 {{image reference="tags_aws_cf.png"/}}
54 )))
55 * Leave other options on the page as default (or you can configure specifics if you want) and click NEXT
Sanchita Singh 11.2 56 * Make sure to select the check-box for acknowledging that AWS CloudFormation might create IAM resources. And click on **CREATE STACK**(((
Sanchita Singh 1.1 57 {{image reference="capability_IAM_aws_cf.png"/}}
58 )))
Sanchita Singh 14.5 59 * 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>>doc:Documentation.UserGuide.GettingStarted.WebHome]]
Sanchita Singh 1.1 60
Sanchita Singh 11.2 61 == Github Repository ==
62
Vincent Massol 14.10 63 You can visit the [[GitHub repository>>https://github.com/xwiki-contrib/aws-xwiki-cloudformation]] to download the CloudFormation Template code for this deployment, to modify it for your needs and to post your comments.
Sanchita Singh 1.1 64
Sanchita Singh 11.2 65 = Troubleshooting =
66
Sanchita Singh 14.5 67 * 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 the 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/
68 * 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.(((
Sanchita Singh 1.1 69 {{image reference="unrecognised_resource_error_aws_cf.png"/}}
70 )))

Get Connected