(Linux)Deploy a WebSphere Commerce environment locally
We can deploy a WebSphere Commerce environment locally for developing, testing, or debugging a local runtime environment. Build a more complex system for the production environment.
Before beginning
- Ensure the Docker images are loaded to the company's private Docker registry
- Ensure the machine has the minimum requirements of a 2 core processor, 8 GB RAM, and 50 GB free disk space.
- (DB2) Prepare IBM Db2 Version 11.1.2.2 or later for use with the WebSphere Commerce application.
- (Oracle) Prepare Oracle 12c Release 2 or later for use with the WebSphere Commerce application.
Procedure
- Install Docker.
- Install Docker Version 17.06 or later.
- Install Docker Compose Version 1.10 or later.
- Consider creating a Docker Unix group.
Note: Prefix sudo to Docker commands if you do not create a Docker Unix group.
- Download the following sample file and update fields to suit the environment.
Note: If the link does not prompt us to save, right-click and save the file. Open the file in a source code editor to view and edit in the proper YAML format.
- (v9.0.0.0) (v9.0.0.1) docker-compose.yml
- (v9.0.0.2) docker-compose.yml
The YAML samples assume we are using a Db2 Docker image. Update all the parameters that are in angle brackets <>. The sample files are commented with descriptions of the parameters.
- In a command line, go to where you downloaded the docker-compose.yml file.
- Download the Docker images and deploy the Docker containers.
docker-compose -f docker-compose.yml up -d
Note:
- If the images are not already on your machine, the command downloads Docker images from our registry. The images are approximately 10 GB in total so the duration of this command depends on your Internet connection.
- Whenever our Docker virtual machine is restarted, restart the Docker containers by rerunning the docker-compose -f <file> up -d command.
- If you loaded sample data in the database, then build the search index.
- Send the following REST request (POST) and add basic authentication with login as spiuser and the password for the spiuser. We can build the search index using one of the following methods:
- By using cURL if you have cURL installed. Use the following cURL command with the spiuser plain text password.
curl -k -u spiuser:spiuserPassword-X POST https://<transaction_server_hostname>:5443/wcs/resources/admin/index/dataImport/build?masterCatalogId=10001
- By using a browser plug-in such as HttpRequester (for Mozilla Firefox) or Postman (for Google Chrome). Use the following URL and authenticate with user spiuser and the spiuser plain text password.
https://<transaction_server_hostname>:5443/wcs/resources/admin/index/dataImport/build?masterCatalogId=10001
Note the jobstatusId that we get in the response, for example, {"jobstatusId":"xxxxx"}.
- Use the jobstatusId and send the following REST request (GET) to check the request execution status. Again, use basic authentication with spiuser and the spiuser password.
https://<search_server_hostname>:3738/search/admin/resources/index/build/status?jobStatusId={jobstatusId}When successful, you will get a Status: 200 OK and response similar to the following example:
response content: { "finishTime":"2017-08-01 06:49:31.395759", "lastUpdate":"2017-08-01 06:49:31.395759", "progress":"100%", "jobStatusId":"14003", "startTime":"2017-08-01 06:48:17.369909", "message":"Indexing job started for masterCatalogId:10,001. Indexing job finished successfully for masterCatalogId:10001.", "jobType":"SearchIndex", "properties":"[]", "status":"0"}
- Ensure that we can log in to Management Center.
- https://<transaction_server_hostname>:8000/lobtools/cmc/ManagementCenter
- Ensure that we can visit the Aurora starter store.
- https://<store_server_hostname>:8443/wcs/shop/en/auroraesite
What to do next
- Load data to the database, such as the store catalog.
- Optionally enable IBMid authentication so that business users can use their IBMid credentials as a single sign-on to access web-based tools.
- Experiment with configuring WebSphere Commerce by using utilities in the Utility server Docker container or by using Run Engine commands.
- Learn how to package custom code that can be deployed to our Docker images.
- Learn how to update our Docker images with the packaged custom code. See
Building custom Docker images based on customization packages.
Related concepts
Extract and load data
Run Engine commands
Related tasks
Building the WebSphere Commerce Search index
Building custom Docker images based on customization packages
Use the Management Center
Running utilities from the Utility server Docker container