Writing CDK code for XWiki demo and production installation
– Demo/Testing installations can be run on single EC2 instances. Such installations can be made by running both the database server and XWiki server on the same Virtual Instance.
– For production installation of Xwiki the details of design and architecture of IAAC is given here Elastic Compute Cloud-based Amazon Machine Image for XWiki
Writing packer script for both demo and production installations
– Packer can create multiple images for multiple platforms in parallel, all configured from a single template.
– Will write templates to create near-identical machine Images which can be used to spin up Demo/Testing and production installs of XWiki on AWS, GCP, and Azure and other platforms later.
Published AMIs for both demo and production installations to AWS marketplace.
– Create AMIs for both demo and production installs from Launch Templates and publish them to AWS Marketplace for better distribution to end-users
Making Youtube videos for XWiki channel describing how to set up WXiki from CDK code and AMI in user’s AWS account.
– Will create videos explaining the use of the Images and how to deploy XWiki in the user’s AWS account using AMI or CDK scripts in the user’s AWS accounts.
– This will help in better marketing, visibility, and reach of the newly available methods of installing XWiki.
Documenting the work done and how to install XWiki using CDK code and Packer Image.
Since the first phase of GSoC ended today , I would like to list out the things which I have completed in first phase for XWiki AMI Project:
- I started by finalising the system design for production based installations on AWS by discussing it with Sachin Chopra and created the design wiki for the same : https://design.xwiki.org/xwiki/bin/view/Proposal/Elastic%20Compute%20Cloud-based%20Amazon%20Machine%20Image%20for%20XWiki/
- After this, I started working on writing CDK Code for demo and production based installations of XWiki along with proper unit tests. This is specifically for developers as they will be able to tweak the configurations of the system as per their need since CDK provides high level interface where developers can use high level languages to interact with lower level Cfn classes. I raised the Pull requests : XAWS-4: Added CDK code for XWiki demo installation with unit tests. by sanchita141011 · Pull Request #6 · xwiki-contrib/aws · GitHub for demo based installation and XAWS-5: Added CDK code for configuring production XWiki with MySQL in AWS account by sanchita141011 · Pull Request #8 · xwiki-contrib/aws · GitHub for production based installations. (with >90% unit test coverage) .Both PRs have been merged and people can use them to run XWiki on AWS. The system was tested on multiple OS and works fine everywhere. This was my first release for the project at end of two weeks.
- For non -developers, to make things even easier, I created Cloudformation template for production based installation only since Vincent Massol said we don’t need to focus on demo based installation . The cloudformation provides a 1-click solution where non developers can install xwiki on aws in a couple of clicks. I have uploaded it in an s3 bucket for easy reference in Cloudformation and people can go to 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/templete/xwiki.template.json to install XWiki in couple of clicks (Related PR: Cloudformation template to install XWiki in AWS account by sanchita141011 · Pull Request #1 · xwiki-contrib/aws-xwiki-cloudformation · GitHub ). No development knowledge would be needed for this. This was inspired from Drupal’s way of managing it’s cloud based distributions and was on top of what I proposed in my proposal. This was my second release for this project about 1 month from the starting of the GSoc phase 1.
- I created AMIs for production based installations to be uploaded to AWS Marketplace. Since marketplace supports only AMI based templates, we could not use the system design we created for Cloudformation based and CDK based installation and had to restrict ourselves to EC2 + server less apps. I have submitted the AMI to marketplace and review has come back with a couple of improvements which I need to make before it can be made live for production use directly through Marketplace. This was supposed to be my third release in first phase but got delayed due to response from AWS for checking the AMI.
- Moreover all approaches just use latest stable tag of XWiki from docker hub, thus the AWS Code would not need to be maintained and no change would be required (as long as we don’t switch from relational DB to non relational DBMS). All new versions would be automatically fetched as latest stable tag of xwiki docker hub image gets updated. This means low to no operational overhead and no extra maintenance required. (You guys may ask why we need two ways of installing XWiki : One through cloudformation and one through Marketplace. The reason is both of these will be running on separate system designs due to marketplace constraints. I’d recommend using the Cloudformation template approach as it’s able to make use of full suite of AWS Services and is going to give end users similar or better experience while spinning up XWiki compared to marketplace)
- With this I have completed 70% of the total work we planned for this year’s GSoC programme. Weekly progress has been described in this forum post: GSOC 2021- Sanchita Singh - Work Summaries - #6 by sanchita. In next phase I am going to focus on creating the documentation of the above. The detailed usage steps, prerequisites , explanations, FAQs for all methods available on similar lines as Drupal provides for its customers.
- I will be creating videos explaining how to use these methods to install XWiki on AWS and will be submitting them for uploading to XWiki Youtube channel.
- Creating Jenkins job in XWiki CI to directly take artefacts of cloudformation templates to S3 bucket where we are storing templates for public usage. Even though we are not expecting to make any changes to this template since the infrastructure would always remain same, the feature would be nice to have.
- I will be exploring the use of Packer , if time allows to see how we can scale these solutions to Azure and GCP too for reaching out to a wider user base.