-
Notifications
You must be signed in to change notification settings - Fork 4
Components
Those components are the pillars of our solution. Each one tackles a different problem in the way of running a solution.
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.
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.
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.
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.
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.
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 ofRESTRICT_INSTANCE
tofalse
.
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 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:
- 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.
- 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.
Sultan v1.1.0
An Open edX Remote Devstack Toolkit by Appsembler
Errors are possible all the time. If an error's fired while executing commands from this toolkit it is recommended to do a little bit more debugging. While this might be an issue with the tool, we just want you to make sure that have everything correct set up in place:
- Run make
config.debug
and check if all of your environment variables hold the correct values. - Toggle the verbosity settings (
VERBOSITY
, andSHELL_OUTPUT
) in your env file. Follow instructions in the comments above of them for more details. - Check our Wiki page for a detailed documentation on the configuration process.
If you couldn't identify the cause of the problem, please submit an issue on https://github.com/appsembler/sultan/issues.