Skip to content

Workflow

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

Before jumping into Let's Start section, we strongly feel you understand the workflow this toolkit is implementing and how to work with that flow to gain the most out of it.

  1. You will start by creating a GCP project or making sure you have access to one.
  2. After getting access to a GCP project, you'll need to install GCloud SDK. Follow those instructions for step-by-step documentation on how to do so.
  3. Then make sure to obtain a copy of a Service Account Email, and a Service Account Key on your local machine for the GCloud project you just joined or created. Here's how to Create and Manage Service Accounts from Google.
  4. Now, you can start cloning the repo and creating your own copy of the .configs file using make config.init.
  5. Make sure you override the following key variables in your newly created .configs.<username> file:
    • SSH_KEY: The path to your SSH key that has access to GCP and Github. Access to Github is only required if you're cloning a private repository or pushing to a protected project.
    • PROJECT_ID: The ID of the GCP project that is going to host your devstack.
    • SERVICE_ACCOUNT_EMAIL: This is the GCP project's service account email address. Usually, Google will give you this email during project creation or cab be granted to you by the project admin.
    • SERVICE_KEY_PATH: The path to the downloaded JSON file key of your GCP project.
  6. Sultan has playbooks that help you getting your remote machine ready.
  7. After deploying the machine, we automatically provision the devstack for you. This will be performed right after the deployment is successfully done.
  8. After provisioning the devstack, you can create an image of your instance to help you skip most of the previous steps in the future.
  9. To work on the devstack, you either obtain an IDE that helps you make a seamless SSH connections with your server like Visual Studio Code. Or you need to mount the remote workspace on your machine. Sultan will help you do so without worrying about the technicalities a lot.
  10. During the development, you can run any command against the remote machine or against the devstack using the Sultan's make targets.
  11. After finishing, you can just stop the servers to reduce the running cost.

Picking up from where you left is super easy using this approach; changes will be reflected immediately on the machine, and your computer is going to remain clean if you communicated with your instance using Sultan's make targets and didn't manually play with the infrastructure.

If you face a zlib problem on Mac machine installing gcloud, you just follow these instructions and you're good to go:

$ brew install zlib
$ brew reinstall python
$ brew reinstall python3
Clone this wiki locally