Skip to content

Latest commit

 

History

History
101 lines (69 loc) · 3.56 KB

scatch-org-creation.md

File metadata and controls

101 lines (69 loc) · 3.56 KB

Setting up UST Event App for Scratch org Development

This project is designed to use CumulusCI. So your first job is to make sure that you have the following installed on your development computer:

  1. Python 3+
  2. Git
  3. Salesforce Command Line Interface (CLI)
  4. CumulusCI

Setting up CumulusCI

A complete set of general instructions on setting up CumulusCI can be found in the CumulusCI Documentation

  1. Get a copy of the Event App code from GIT. If you are not directly collaborating with the project you may want to fork the project into your own GIT repository:

    git clone https://github.com/tcdahlberg/USTEventsDX.git
    
  2. In your terminal, in the code directory check and see if the project is already set up with CumulusCI:

    cci project info

    If the project is not set up you will get this message:

    The file cumulusci.yml was not found in the repo root. Are you in a CumulusCI project directory?

    If you get the above message use the following command to init the project into cumulusCI:

    cci project init
  3. Connect Github and and Cumulus to this project:

    cci service connect github

Set up Saleforce DX Scratch Orgs

  1. Enable Dev Hub in Your Org
  2. Connect SFDX to Your Dev Hub Org (be sure to use the --setdefaultdevhubusername option).

Spinning Up A Scratch Dev Org

For production environments you will want to manually set up your org to finely tune your permissions and sites. Use the following instructions for installation in production Orgs.

Create a dev configured scratch org for 7 days

cci org scratch dev <org_name> --days 7

Confirm your dev configured scratch org was created

cci org list

Run a flow to deploy the project and install dependencies into your dev configured scratch org

cci flow run dev_org --org <org_name>

Normally you would be done with a project at this point, but the Event app requires a salesforce site domain be set up. You will need to do this in the next step and then run one final command to complete the site set up.

Create a site

  1. Open the org you are working on in the browser

    cci org browser <org_name> 

    <org_name> for development is dev

  2. In Setup go to User Interface -> Sites and Domains -> Sites

  3. Select a subdomain that is available. Since you are spinning up scratch orgs you may want to start incrementing a subdomain on a theme (myevents0001...myevents0002).

  4. Click "Register My Salesforce Site Domain"

Automate the Rest of the Site Setup

If you are spinning up a scratch org for development purposes then setup just got easier for you. Just enter the following command:

cci flow run config_site --org <org_name>

<org_name> for development is dev

Open Up Your Newly Created Dev Scratch Org

Your new scratch org is created and ready for you to develop against!

cci org browser <org_name>` to open the org in your browser.