Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback

Environment setup for developers

Describes how to set up your developer workstation to start building Configured Commerce Cloud solutions.

🚧

Prerequisites

To successfully set up your Configured Commerce in the Cloud developer environment, the following must be completed:

  • Possess knowledge and understanding of the Git technology and command line tools
  • Create a private GitHub repository and have access to edit collaborators
  • Optimizely has completed the provisioning of the Sandbox and Production Configured Commerce Cloud instances.
  • Cloud developer workstation works on currently supported Microsoft Windows installations only. Linux and macOS are not supported.

Developer workstation setup process

Authorize Optimizely account to GitHub

📘

Note

This is only allowed for organizations. For personal accounts, Github only allows full access collaborators. To clone the Configured Commerce Cloud repo, you need to create a shared service account, and the Configured Commerce Cloud hosting team will add you to the group to access git clone https://github.com/InsiteSoftware/insite-commerce-cloud.git after you submit a ticket.

If you are new to Configured Commerce and are not working on an active project, submit a support ticket requesting an invitation to the Configured Commerce Git repository. Make sure to create a shared group Git account, as individual accounts are not allowed. For example, partnername-Optimizely not JonDoe-partner.

Only complete this section if you are connecting your repo to an environment hosted by Optimizely. This step allows build server access to the repository so support can pull your extensions into your environment. Do not complete this step if you are completing the developer training course.

  1. Go to the repo on github.
  2. Go to Settings > Collaborators & Teams.
  3. Enter insite-teamcity-build under Collaborators and click Add collaborator.
  4. Change permission for insite-teamcity-build to Read.

Clone insite-commerce-cloud repository

  1. Open git bash or command line.
  2. git clone https://github.com/InsiteSoftware/insite-commerce-cloud.git

Replace default remote origin

  1. Change directory to the cloned directory.
  2. git remote rm origin
  3. git remote add origin [YourRemoteGitPath]

For example, https://github.com/yourprofile/isccloud.git

Add upstream repository

Add the original upstream repository to receive any new updates deployed by Optimizely to the Configured Commerce.Web project in the repository. This uses git tags to identify releases. Git pull specific releases to test specific versions locally against customizations (theme and extensions).

  1. git remote add upstream https://github.com/InsiteSoftware/insite-commerce-cloud.git
  2. git push --set-upstream origin master

Create a custom Classic Theme or Spire Blueprint

Classic CMS - Create a project theme using the PowerShell script provided. Multiple themes can be created in a single repository, however, themes cannot have the same name.

  1. Locate the local git repository in Windows Explorer and go to the /src folder.
  2. Open PowerShell and execute the ./createTheme.ps1 Powershell script. For example, ./createTheme.ps1 - themeName "YourCustomTheme".
  3. Open the Configured Commerce.Web solution in Visual Studio and check that it has an Extension library, Configured Commerce.Web project, and the custom Theme project.

Check Environment Versions – Use the steps in the Upgrade Configured Commerce Cloud article article to make sure the version generating the theme is in sync with the deployed version. This prevents merging a code version that is ahead of what you have deployed or are deploying.

Configure Optimizely NuGet source in Visual Studio

NuGet packages are available on https://nuget.optimizely.com, which does not require authentication.

  1. Go to Visual Studio > Tools > Options > NuGet Package Manager > Package Sources.
  2. Click Add:
    1. Name – Configured Commerce
    2. Sourcehttps://nuget.optimizely.com/feed/packages.svc
  3. Restore packages.

Configure the local environment

Configure IIS, SQL, and the HOSTS file to debug the solution locally.

📘

Note

The following steps can be completed manually and without using the Configured Commerce installer.

⚠️

Warning

The Configured Commerce installer is not supported.

  1. Locate the root directory of the local git repository and execute the Configured CommerceSetup.exe file.
  2. Complete the setup using the guided instruction.
  3. Open the HOSTS file with Administrator permissions and add the corresponding local entry.
  4. Open Visual Studio and rebuild the solution.

Finalize git branching

Create two local branches called sandbox and production, used by the corresponding deployments. Pushing to the remove server automatically creates the remote branch. Optimizely schedules production deployments. Pushing to the remote production branch does not automatically make the theme and server-side customizations go live. Sandbox deployments are automated, and any customizations refresh the insitesandbox.com domain within a few minutes of a git push to the remote sandbox branch.

  1. Open git bash or command line and open the install location.
  2. git branch sandbox.
  3. git branch production
  4. Verify the Configured Commerce website loads in the browser on the local dev machine.

📘

Note

Git is a distributed version control system. Optimizely only supports pulling the Extensions code from GitHub, but you can use any version control system internally for your workflow. Attach the Github repo to your internal repo as a remote and push code to it.