Skip to content

Components

Ahmed Jazzar edited this page Feb 4, 2020 · 4 revisions

Those components are the pillars of our solution. Each one tackles a different problem in the way of running a solution.

Sultan

Local

Your local machine is the controller, the Puppet Master of the machines. In order for it to communicate with other cloud machines and instances, some configurations have to be done. Those configurations will go on the following files, and will be cleaned from them each time you stop your instance:

  • /etc/hosts: Carries your devstack host names.
  • ~/.ssh/config: Carries the connection details of your devstack (HostName, User, etc...).
  • ~/.ssh/known_hosts: Carries the known keys for remote hosts. We change your server record every time it's changed so you don't have to interact with this file manually during removing and creating new instances.

Machine

Each developer can maintain only one machine at a time. That machine is based on Ubuntu 18.04 LTS by default. You can reconfigure your machine later from the configuration files.

Recommended Machine Type

You can decide your specs as you please. However, edX recommends 2 vCPUs and 8GB of memory.

The default provisioned instance comes with 7.5 GB of RAM and 200 GB disk space to ensure smooth read/write operations over the network.

Preemptible Instances

The default behavior now is to provision a GCP preemptible machine. This will cause a termination of your instance in 24 hours, but will help us reducing the cost by a huge percentage. To turn this off, please refer to your configuration file and remove --preemptible flag from INSTANCE_EXTRA_ARGS variable.

Please note that each user can maintain a single machine only; creating a new machine will result in deleting the previous one.

Devstack

Sultan can provision any devstack for you on the cloud. We are not requiring you to change the behavior of the devstack for this toolkit to work, and technically, we don't have to change Sultan's behavior if the infrastructure requirements in the devstack you're using have not changed.

Network

To ensure a secure environment and a reliable one, we implemented a firewall policy on all created instances this toolkit is creating by default. Those instances have an internal and external IP address. However, each developer's instance is only accessible by them, and nobody in the team nor on the internet is allowed to connect to any port on that instance.

The rules that ensure this behavior are:

DENY     0.0.0.0/0
ALLOW    <your.public.ip.address>

To change this behavior and make your instance open to public go to .configs.<username> file and change the value of RESTRICT_INSTANCE to false.

SSH keys

For you to be able to access your instance and any private repo on Github, we ask for an SSH key to be available on your local machine during the deployment process. This key is expected to have access to your GCP space, and edx-platform Github repo. We are using GCP VMs to deploy your devstack on the cloud.

Sultan is not carrying any keys between your machine and the remote machine. Instead, we use AgentForwarding to perform all necessary operations on the remote server.

Check those documents on how to add your SSH key to Github and GCloud instance

Images

Images here are a helpful resource for you. Maintaining an up-to-date image will allow you to skip the deployment process of a server and the provisioning process of a devstack. Launching a new instance will be doable in a few minutes with the help of images.

We have two types of images you can use:

  1. The master image which is a clean image of the devstack master branch.

    Master images should be pre-populated by your GCP project admin. you don't have to create one in order to use them.

  2. A user-specific image that each developer creates for themselves.

    Each user is entitled to issuing/using only one user-specific-image; creating a new image of that type will result in deleting the previous one.

Clone this wiki locally