To successfully setup your B2B Commerce (ISC) 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
- Complete the Project Initiation Form (select "B2B Commerce Requests and Deployments" in the "Please choose your issue type" dropdown menu) and receive a response from Optimizely Application Support
- Optimizely has completed the provisioning of the Sandbox and Production B2B Commerce Cloud instances.
Cloud developer workstation works on currently supported Microsoft Windows installations only. Linux and macOS are not supported.
Elasticsearch log4j vulnerability
Due to a log4j vulnerability within Elasticsearch, we recommend developers install a mitigated version of Elasticsearch 5 within their local environments using the following Docker command:
docker run --restart always --name elastic5 -d -p 9201:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e ES_JAVA_OPTS="-Dlog4j2.formatMsgNoLookups=true" elasticsearch:5.6.11
|Authorize Optimizely account to GitHub|
This is only allowed for organizations, not personal accounts. For personal accounts, Github only allows full access collaborators. To clone the B2B Commerce Cloud repo, you need to create a shared service account and the B2B Commerce Cloud hosting team will add you to the group needed to gain access to run the "git clone <https://github.com/InsiteSoftware/insite-commerce-cloud.git>" after you submit a ticket.
If you are new to B2B in the Cloud and you are not working on an active project, please submit a support ticket requesting an invitation to the B2B Commerce Git repository. When creating Git accounts, please create a shared group 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.
- On github.com navigate to the repo.
- Go to Settings > Collaborators & Teams.
- Under Collaborators enter "insite-teamcity-build" and click Add collaborator.
- Change permission for insite-teamcity-build to Read.
|Clone insite-commerce-cloud repository|
- Open git bash or command line
- git clone https://github.com/InsiteSoftware/insite-commerce-cloud.git
|Replace default remote origin|
- Change directory to the cloned directory
- git remote rm origin
- 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 B2B Commerce.Web project in the repository. This will use git tags to identify releases. Git pull specific releases to test specific versions locally against customizations (theme and extensions).
- git remote add upstream https://github.com/InsiteSoftware/insite-commerce-cloud.git
- 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.
- In Windows Explorer, locate the local git repository and navigate to the /src folder
- Open Powershell and execute the ./createTheme.ps1 Powershell script
For example, ./createTheme.ps1 -themeName "YourCustomTheme"
- Open the B2B Commerce.Web solution in Visual Studio and validate it contains an Extension library, B2B Commerce.Web project, and the custom Theme project.
|Configure Optimizely NuGet source in Visual Studio|
NuGet packages are available on <https://nuget.optimizely.com/>, which does not require authentication
Configure NuGet source
- In Visual Studio, navigate to Tools > Options > NuGet Package Manager > Package Sources
- Click Add
- Name - B2B Commerce
- Source - https://nuget.optimizely.com/
- Restore packages
|Configure the local environment|
Configure IIS, SQL, and the HOSTS file to debug the solution locally.
The following steps can be completed manually and without using the B2B Commerce installer.
- Locate the root directory of the local git repository and execute the B2B CommerceSetup.exe file
- Complete the setup using the guided instruction
- Open the HOSTS file with Administrator permissions and add the corresponding local entry
- Open Visual Studio and rebuild the solution
|Finalize git branching|
Create two local branches called sandbox and production. The remote branch is automatically created when you push it to the remote server. These will be used in their corresponding deployments. Production deployments will be scheduled by Optimizely. Theme and server-side customizations will not automatically go live upon push into the remote production branch. Sandbox deployments will be automated and any customizations will refresh the insitesandbox.com domain within a few minutes of a git push to the remote sandbox branch.
- Open git bash or command line and open the install location.
- git branch sandbox
- git branch production
- Verify the B2B Commerce website loads in the browser on the local dev machine.
Git is a distributed version control system. We only support pulling the Extensions code from Github, but the partner is free to use any version control system internally for their workflow. They can simply attach the Github repo to their internal repo as a remote and push code to it.
Updated 2 months ago