Commit 75d202b1 authored by Carlos Torres's avatar Carlos Torres

Updating setup_scpack.md and install_scpack.md, to take into account sc_pack:v2.

parent 11f4afc7
Pipeline #9456 passed with stage
in 1 minute and 2 seconds
# Install sc_pack
# Install sc_pack ![linux](../_static/images/os/linux.png)
The `sc_pack` distributable can be downloaded at the below link:
## Preliminaries
To manage the edge servers running ShimmerCat Accelerator, we install a "pack" of programs called `sc_pack`. The installation consists of three steps: first you need to install `sc_pack` itself, second you need to create deployment sites and domains to serve, and third you need to ask `sc_pack` to prepare the hierarchy of directories.
<iframe src="https://api.accelerator.shimmercat.com/download/" height="200" width="300" frameBorder="0">
<p>Your browser does not support iframes.</p>
</iframe>
sc_pack comes with a self-sufficient installer that should hopefully work in any x64 Linux.
You can also find the download link for the latest version of `sc_pack` by visiting the [API page](https://accelerator.shimmercat.com/presentation-api/v1/download/sc_pack/), or by directly using the below download command. It (requires [jq](https://stedolan.github.io/jq/)), which you can install with:
All the `sc_pack` services (shimmercat, sc_logsagent, redis, bots-blocking, usher(s), among others) run in a [`rkt` pod](https://coreos.com/rkt/). The advantage of this approach is that we can set individual resources quota to each service.
```
$ sudo apt-get install jq
```
- One host (VPS or physical) contains several deployments.
- Each deployment runs in its own `rkt` pod.
- Each deployment/`rkt` pod is managed by a single host service, e.g. Systemd service.
The `rkt` pod uses its own filesystem, except for the directory `/srv/deployment` that is mapped to the outer host's deployment directory. This is exactly how Docker+Kubernetes does it, but without having to run Docker nor Kubernetes. Since the pod comes with its own filesystem, Python is installed directly on the image and not in a virtual environment. The `rkt` pod uses the same network namespace than the host. This means that we still need to assign ports in such a way that they don't collide with other ports in the host or other deployments.
Now you can download the latest `sc_pack` with the below download command:
## 1. Installation
The installer can be found at `https://storage.googleapis.com/downloads-shimmercat-com-561059/sc_pack/rkt/sc_pack-linux-amd64-<sc_pack_version>.bootstrap`, versions will be something like: 2020.1 and we will increase the integer after the dot. For instance the first version can be found at:
[https://storage.googleapis.com/downloads-shimmercat-com-561059/sc_pack/rkt/sc_pack-linux-amd64-2020.1.bootstrap](https://storage.googleapis.com/downloads-shimmercat-com-561059/sc_pack/rkt/sc_pack-linux-amd64-2020.1.bootstrap). You can download the installer and run it in a VPS to get sc_pack installed.
### Download sc_pack
```
$ curl -O $(curl -s https://accelerator.shimmercat.com/presentation-api/v1/download/sc_pack/?format=json | jq -r .download_url)
wget https://storage.googleapis.com/downloads-shimmercat-com-561059/sc_pack/rkt/sc_pack-linux-amd64-2020.1.bootstrap
```
Note that you can also find the download url at [this API page](https://accelerator.shimmercat.com/presentation-api/v1/download/sc_pack/).
### How to run the installer?
The .bootstrap files are like shell scripts, so just give execution permissions to the downloaded file:
<br>
<br>
`$ chmod +x sc_pack-linux-amd64-2020.1.bootstrap`
and, run it:
`$ ./sc_pack-linux-amd64-2020.1.bootstrap`
Now `sc_pack` should be installed. To verify that it is properly installed run:
```
$ sc_pack -h
```
Note that after installation, the sc_pack command is available anywhere in the host but it still needs to be executed from a valid deployment directory most of the times.
- - -
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment