.NET Framework online Candy Store using Windows Containers in OpenShift
- Access to an OpenShift cluster that supports Windows Containers
- The
oc
command-line interface for OpenShift
- Create a cluster that supports Windows Containers
- Create a project
- Create and populate the MS SQL Server database
- Prepare Windows Container node
- Create the service 'netcandystore'
- Create route for service 'netcandystore'
- Create the service 'getcategories'
- COMING SOON: Replace the service 'netcandystore" using image netcandystore:v2
(some RHPDS magic here)
At the command line, run the command
oc new-project netcandystore
Alternatively, you can use the OpenShift console to create the new project "netcandystore".
For the purposes of this demo, this instance of MS SQL Server will run in our OpenShift cluster.
Run the script create_database.sh
Run the script create_database.ps1
This step will pull the image into the node running Windows Containers.
Run the command:
./prepare-preload.sh
Run the command:
./preload.ps1
The service runs in a Windows Container and uses the image quay.io/donschenck/netcandystore:2021mar8.1
Run the command:
oc create -f preload.yaml
Run the following command and wait until the preload job is finished:
oc get jobs -n openshift-windows-machine-config-operator -w
When the job is completed, press Ctrl-C to exit the wait command.
Run the command:
oc apply -f netcandystore.yaml
Run the command:
oc apply -f netcandystore-route.yaml
Run the command:
oc apply -f getcategories.yaml