Build, test, and deploy the Double Dummy Solver (DDS) webservice using the Google Cloud Platform (GCP)
For overall project info please see README.md
Using your favorite web browser, open a cloud shell terminal at https://ssh.cloud.google.com/cloudshell. You'll need a free Google account. These days, most people have one already.
Note that the C++ project is named dds and the webservice project is named DDS. Yes, this could be confusing - we plan to rename one or both.
cd ~/bridge-hackathon/
git clone https://github.com/online-bridge-hackathon/DDS.git
cd DDS/
make run_local_tests
cd ~/bridge-hackathon/DDS/
pip3 install -r requirements.txt
make libdds-build
python3 -m src.api
Open a new terminal tab by pressing the "+" button in the cloud shell menu bar.
make curl_local
Build the application stack using:
cd ~/bridge-hackathon/DDS/
make build
Push to the remote registry:
make push
Remove the old namespace. In the future we plan to have make deploy do this for us. Note that this will make the service unavailable until the deploy finishes successfully.
kubectl delete ns dds-api
Deploy to GCP:
make deploy
Now check your deployment on the GCP console.
Visit https://console.cloud.google.com/kubernetes/list?project=online-bridge-hackathon-2020
Navigate to Kubernetes Engine / Workloads:
Select the dds-api-deployment in namespace dds-api. Or this will take you there directly:
The Created on timestamp should be a few minutes old, roughy matching the time your ran make deploy.
Now view the logs:
- Click on the link under Managed pods. It will look something like dds-api-deployment-58dbc7fcd8-zlzkc.
- Switch to the LOGS tab.
Now send your service a POST request, either from the cloud shell or your local machine:
make curl_prod
When you refresh the logs page you should see a line showing your POST.
No worries! Please post to the p-dds channel of the bridge-hackathon Discord. You can find it here:
https://discord.com/channels/710156643970842754/712639195986002021