Disposable prototypes for our experiments
See Setup for setting the environment up.
- Start Docker in macOS
cd ~prg/openshift/prototypesminishift start- If
pyissuingis failing, login into the applicationLoader, open a terminal and run/app/create.shto load data into Redis - In a separate Shell run
cd ./apps/client && ./run.sh 2> /dev/null& oc login(admin/admin)source ./minishift-docker-login.shcd ./apps/IssuingCluster/pyissuing- Modify the code as desired, then deploy it with
./build-and-push.sh
- Install Docker;
- Setup a
/workshared folded on VirtualBox VM poiting to the directory containing this project - Install MiniShift and start it with
minishift startThe console should be available at:
https://192.168.64.11:8443with
username: admin
password: adminMake sure that no previous issuing project exists.
- Delete the project in OpenShift with
cd infrastructure
./delete-project.shoc projects should not list the project issuing anymore.
- Create the project with
./create-projects.shthat should take care of all the process, creating all the needed elements in OpenShift.
Opening the dashboard at a URL such as https://192.168.64.11:8443/console/project/issuing/overview it should be possible to see the project deployments running.
Wait ta minute to let all the deployment tasks end. Compile the Windows Forms client
-
Start Docker
-
Enter the client project with
cd apps/Client- Compile the client with
./compile.sh- Run the client with
./run.shRun
build.batin IssuingService and RabbitConsumer.
Run
run.batrmall: stop and remove all services
killall: kill remove all container
docker service ls: list the running services;docker service ps web: list the running containers inside the servicewebdocker ps: list running containersdocker ps -a: list all containerdocker service scale web=42: scale (up or down) the servicewebto42replicas (containers)
Use the API, visiting:
[GET] /api/cardholders/counter to count the persisted card holders
[POST] api/cardholder to create a card holder
[GET] api/cardholder/{id} to read a card holder
The [GET] call api/cardholder/1 is pre-populated and should return:
<CardHolder>
<ID>1</ID>
<Firstname>Marco</Firstname>
<Lastname>Bernasconi</Lastname>
</CardHolder>