-
Notifications
You must be signed in to change notification settings - Fork 4
Let's Start
- A UNIX-based machine (Ubuntu or OsX).
- Python 3 bin in your
$PATH
. - Authenticated GCloud.
- SSHFS.
- FUSE for macOS.
- A reliable internet connection (For seamless communication).
-
To edit the default values in
.env
file, you can create a personal copy of the.env
file using$ make environment.create
-
In the created file, there are plenty of environment variables that you can override. For example, if you have a specific
SSH_KEY
linked to your Github and your GCP space you can customize it usingSSH_KEY="$(HOME)/.ssh/appsembler"
-
And also, there are some environment variables that we'd rather you not to change and those are usually marked with
DON'T CHANGE
tag. -
You can check the final values of those environment variables to be used in Makefile by running
$ make environment.display
Start by setting up the instance, the firewall rules, the local configurations, and provisioning your devstack
$ make instance.setup
Now we can assume that your devstack is running and accessible from you. To verify that, you can run the following commands
$ make instance.ping
$ curl -I edx.devstack.lms:18010
The first command is to verify that you can access the server. If it fails, there's probably an error with your Firewall configurations. The second command is more about verifying that the devstack is actually running inside your server, and that you are able to access that devstack. If the second command fails, there's probably an error with your devstack or it might not be running at all.
After finishing the above you can run the devstack from your local machine using the following command
$ make devstack.run
Mounting the work directory on your machine will allow you to start the development process on cloud. You can do the mounting using:
$ make devstack.mount
After finishing you can unmount using
$ make devstack.unmount
Note that unmount
target will stop the server as well.
After provisioning your instance you can create an image from your server immediately so that you don't have to repeat steps 1 to 5.
The following commands will stop your instance if it's running and will remove any previous image if it exists.
-
To create a master image:
$ make instance.image.master.create
Master images are meant to be shipped from a clean, stable instance provisioned from the devstack master branch. Please don't issue ones from a dirty instance.
-
To create a specific image for yourself:
$ make instance.image.create
-
To create an instance from the master image:
$ make instance.setup.image.master
-
To create an instance from a previously exported user-specific image run
$ make instance.setup.image
This command will remove the previously created instance if exists before checking the image. If you don't have an already exported image and you run this command you'll end up losing your instance for nothing.
If your machine disconnected from the network and reconnected again, then most probably you'll end up with a different IP address that the firewall won't recognize. To overcome this issue all you have to do is:
$ make instance.restrict
This command is probably one of the most used commands in this toolkit as it is your gateway to interact with the server.
Usually, devstack developers are asked to modify their own /etc/hosts
file in their system to match their docker host IP. We automatically manage this process now every time you start and stop a devstack instance.
The command that's responsible of updating your hosts file runs an Ansible script against your local machine so that it keeps track of the changes it performs there. We will revert the changes as soon as you stop
your cloud instance.
You can start the devstack without having to SSH into the server using
$ make devstack.run
Note that you can hit
ctrl + c
anytime after the target finishes running the frontend server.
To stop the devstack servers properly you can run:
$ make devstack.stop
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.