Getting started tutorial
To setup and start using ShimmerCat to serve a website, first check the below requirements.
Preliminary requirements
- You should be be familiar with moving around in a Linux environment, including checking and changing file permissions.
- You should be familiar with
curl. - You should have an idea of how a website works, including basics of the HTTP Protocol.
- The tutorial requires
python3-dev, andgcc. - Ubuntu 16.04 or 18.04 is recommended.
Note that you can copy commands to your clipboard, by clicking the icon that appears to the right of the code.
1. Create an authentication token
Use the command below to create a user with the username provided in the request data field <your_username>. The token enables you to use ShimmerCat's cloud service for automatic website optimisations.
The email field is optional, but we strongly encourage you to set an email address in the request data field <your_email> since it enables you to recover your authentication token, access the monitoring system, and subscribe for weekly traffic reports.
$ curl -X POST https://accelerator.shimmercat.com/presentation-api/v1/trial/ -H 'Content-type: application/json' -d '{"username": "<your_username>", "email": "<your_email>"}'
The command creates an authentication token linked to your username that will be returned according to:
{"authentication_token": "<your_authentication_token>"}
Be sure to write down your username and authentication token as you will use it later. If you lost the token and need to recover it, you can have it sent to your mail. You can use your trial authentication token for 2 weeks to try it out for your domains. After a week the token will be disabled, but it is possible to enable everything again if you decide to continue using the services.
For the second step, you can now choose to either use Ansible recipes (recommended), or the manual setup.Two possible approaches
2. Recommended approach: Setup the programs with Ansible
To manage the servers where ShimmerCat is running, you need to install a "pack" of programs called sc_pack. We highly recommend that you do this with the help of the Ansible recipe prepared for the purpose, just follow the instructions in setup sc_pack with Ansible.
Normally you run a web server on a remote server which serves the website content, but you can also try this tutorial on your local machine. In that case, what is referred to as the "server" will be your laptop.
2. Alternative approach: Setup the programs manually
To manage the servers where ShimmerCat is running, you need to install a "pack" of programs called sc_pack. To install and set it up, see setup sc_pack in three steps.
User account
We strongly suggest not to use root when executing the sc_pack commands during setup.
Example website
For testing, you can download our static website example. You can simply decompress it in your working directory. Be sure to check that you have the file index.html in the folder www/.
Summary
Congratulations, you have now completed the tutorial and ShimmerCat should be running for the domain example-accelerator.shimmercat.com!
For the next recommended tutorials, see:
Thanks a lot for your time, and keep reading!