Startup Instructions

From TheInterWiki

Welcome!

Welcome to The Interventional Services Wiki Project! This page will walk you through the process of creating your very own wiki for your lab.

This startup guide will include all of the information needed to get your wiki running. It will also provide links to further information if you want to dive deeper into the subject matter.

Get an Amazon AWS account

The first step is to create an Amazon Web Services(AWS) account. If you already have one, that will work, but we encourage you to create an account solely for the wiki. A later tutorial will show you how to access the wiki from your AWS account. AWS requires a unique email address for a new account, so you may need to create one. Gmail works for this, or a dedicated account at your facility. Again, it is good practice to use a dedicated email for this and not a personal email account.

AWS Mini Tutorial

Terminology

  • AMI - Amazon Machine Image. An AMI is a “hard-drive” containing all of the software and data needed to run your wiki. these images are vetted by Amazon and available on the AWS marketplace. A Ubuntu Unix ami was used as a starting point for the wiki. You will go to the AWS marketplace to select the Interventional services wiki AMI.
  • Instance - the instance is the “hard-drive“ and the “server“. In this case, it is a virtualized server that mimics the hardware that you choose to run the image. Once you have made all of the configurations to the instance, and launch it, then you will have a running server that you can connect to.
  • IAM - Identity and Account Management. AWS includes some very powerful tools for controlling back-end access to your AWS account and instances. For example, the main AWS account that owns the wiki and domain names must include credit card and billing info. It might not be a good idea to have this information available to day-to-day staff. You can create another AWS account that can access the wiki Dashboard without having access to the billing module. This also makes it easy to manage access to any account in case of personnel changes.

Create an AWS account (Free)

Launch your instance (Free)

Once you have an AWS account, you will need to visit the EC2 service. This stands for Elastic Computing Cloud and manages your virtual servers. When it’s time to choose a domain name and link it to your server you will need to visit Route 53.

Once you are in EC2, click on instances.

- 1-click launch - SSH into command line. Create MySQL user and database for MediaWiki. Grant all privileges to user for database. (I'd recommend walking the buyer through the steps of creating a user/db for MediaWiki.)

- Go to web server: yourdomain.com/wiki . Follow instructions to install MediaWiki. (Depending on how the subscriber launches this product, they may not have a domain for the launched instance. It may be better to recommend that the subscriber navigates to https://<EC2_Instance_Public_DNS>/wiki. They can readily pull the Public DNS from the EC2 console and navigate to the front facing MediaWiki page to continue steps.)


  -Under extras, check only Visual Editor. The rest will be installed from the back end.

- Download LocalSettings.php - SSH to command line. sudo nano /var/www/html/wiki/LocalSettings.php - Paste in full text from downloaded file and add text from /var/www/html/wiki/SettingsExtras.php. Save file. - Open MySQL and import theinterwikidata.sql, this will overwrite all but the admin user with all the template data. Exit MySQL. - Run php /var/www/html/wiki/maintenance/update.php twice. - Run php /var/www/html/wiki/extensions/SemanticMediaWiki/maintenance/rebuildData.php - Go back to the web interface and confirm all is working. - Proceed to fill in physicians and Procedure data.

Though this is not necessary, Markdown notation is accepted within the Usage Instructions field. This means that we can create a more visually organized means of providing this information/instructions. I'll leave an example of what you could provide for your Usage Instructions:

      1. SSH into EC2 Instance ###

- SSH over port 22 to your Linux instance - Login with username: ubuntu

      1. MYSQL User/DB creation on Instance ###

- Steps to create user/db - Steps to create user/db

      1. Accessing the WebUI ###

- Through a web browsers navigate to the public DNS of your instance: https://<EC2_Instance_Public_DNS>/wiki - Next Steps to complete the installation

      1. Location of saved Data on instance ###

- Location of MYSQL DB - Any other location - AMI and container product usage instructions

      1. Additional Dependencies ###

- Stable Internet connection required - AMI-based product requirements


This sample formatting is an example that you can leverage, but is not required. The usage instructions will require clarified steps on how the user can create a user/db. Any other actions that are required from the subscriber to create resources, will need to be detailed.

Please let me know if you have any further questions regarding the provided feedback.

Configure your wiki

Create a domain name ($)

You will need to log-in to the Unix command-line interface(CLI) to make these changes. When you launched your instance from the AMI, you created a key pair. You will reference this key pair when using SSH to connect.

You can find a connection guide by clicking the connect button after selecting your instance from the list on your AWS EC2 dashboard.

Once you are connected to your CLI, you will need to edit the LocalSettings.php file.

First, change directory (cd) to the web server directory:

cd /var/www/html

Now, list all the files:

ls -al

This is your wiki code, the actual information in your pages will be stored in a database, more on that later.

Open a simple text editor and tell it to open the LocalSettings.php file with this command:

sudo nano LocalSettings.php

If you have never used a simple text editor, you may want to read up on it. Just Google "unix nano".

Let's change the name of your wiki first. Look for this section near the top:

$wgSitename = "YourWikiName";
$wgMetaNamespace = "YourWikiName";

Change these to the name of your wiki.

Next, a few lines down is this:

## The protocol and server name to use in fully-qualified URLs
$wgServer = "http://00.00.00.00";

This must be changed to the IP address of your server. You can find this on your Instances page in your AWS console. Click on your instance, and the info will show up below it.

You can save the file at this point by using ctrl-x and entering a "y" for yes. At this point, your wiki should load if you point your web browser to the ip address. Please note you will have to specify a plain http connection, not https. Your browser will probably warn you the connection is unsecure, it's OK we will change this later to be secure.

As long as your wiki page loads, you're good so far! But we're not out of the woods yet, all the passwords and secret stuff needs to be changed as anyone who has this snapshot knows all of your passwords(not secure!)

Securing your server

Here is a list of things to change from the command line via SSH:

  • MySQL (or MariaDB):
    • There is no access to the mysql root user, so no need to change it.
    • Create a new user (there isn't one at install)
    • Grant all privileges on database "my_wiki" to new user
  • edit LocalSettings "#Database Settings" section to reflect these changes
  • Admin user password ("Admin12345" at install)
    • Use the php script ChangePassword.php in the /maintenance directory to change the Admin password so you can log-in to the wiki.
  • Change the secret key for the SecureHTML extension at the bottom of LocalSettings.php to a string of your own choosing

Open your Wiki for new users

Note Warning: This shouldn't be left on more than a couple days. Bots will find you!