A simple To-Do List app demonstrating how to build cloud applications on UpCloud's managed services.
This demo shows how to use UpCloud's managed services to create a small, scalable development environment.
- Runtime: Node.js on UpCloud Managed Kubernetes (UKS)
- Database: UpCloud Managed PostgreSQL
- File Storage: UpCloud Managed Object Storage for task attachments
- UpCloud CLI
upctlinstalled and provisioned with your UpCloud API Token - Kubernetes CLI
kubectlinstalled
Deploy the app in two steps:
- Deploy the managed infrastructure
- Deploy the demo app
Provision the infrastructure with upctl:
upctl stack deploy starter-kit --name=mystack --zone fi-hel1Note: Wait for about 7-8 to minutes for the resources to be provisioned — then save the credentials and configuration settings from the output:
KUBERNETES CLUSTER
Set env: export KUBECONFIG=/path/to/generated/kubeconfig.yaml
...
NETWORKING
...
MANAGED DATABASE
ServiceURI: postgres://<db-user>:<db-password>@<db-host>:<db-port>/<db-name>?sslmode=require
...
OBJECT STORAGE
DomainName: <bucket-domain>.upcloudobjects.com
Bucket: <bucket-name>
AccessKey: <access-key>
SecretKey: <secret-key>
Region: <region>
...
Clone this repository:
git clone https://github.com/UpCloudLtd/example-todo-app.gitEdit ./deploy/resources/secrets.yaml to add your configuration settings.
Your deploy/resources/secrets.yaml file should look like this:
apiVersion: v1
kind: Secret
metadata:
name: dotfile-secret
stringData:
# Database credentials. Use the connection URI format, and
# (important) make sure to remove `?sslmode=require` from the end.
DB_CONNECTION_URI: "postgres://user:****@host:****/dbname"
# Object Storage credentials
S3_BUCKET: "my-bucket-****"
S3_ENDPOINT: "https://****.upcloudobjects.com"
S3_ACCESS_KEY: "AKIA****C9K"
S3_SECRET_KEY: "pDckl****JVN2FYV2YwUw"
S3_REGION: "eu-****-1"Configure kubectl for your cluster:
export KUBECONFIG=/path/to/generated/kubeconfig.yamlDeploy the app:
kubectl apply -k ./deployThis deploys the application and exposes it to the internet. Check the deployment status:
kubectl get svc frontend-app-loadbalancerOnce ready, navigate to the URL shown in the output to access the app.