{"id":16192864,"url":"https://github.com/cube2222/usos-notifier","last_synced_at":"2026-01-20T19:32:30.791Z","repository":{"id":86704739,"uuid":"139072763","full_name":"cube2222/usos-notifier","owner":"cube2222","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-22T12:30:02.000Z","size":113,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T15:12:49.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cube2222.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-28T22:06:22.000Z","updated_at":"2020-07-03T07:15:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4179319-9732-4d5c-b604-1139d3a79dfe","html_url":"https://github.com/cube2222/usos-notifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cube2222/usos-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube2222%2Fusos-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube2222%2Fusos-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube2222%2Fusos-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube2222%2Fusos-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cube2222","download_url":"https://codeload.github.com/cube2222/usos-notifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube2222%2Fusos-notifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28610614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T08:13:11.059Z","updated_at":"2026-01-20T19:32:30.768Z","avatar_url":"https://github.com/cube2222.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GCP Setup\n\n## Conventions\n\nI'm using my account name (jakub.wit.martin@gmail.com), use yours if running on your own.\n\n## Service Accounts\n* credentials\n    * Datastore User\n* marks\n    * Datastore User\n* notifier\n    * Datastore User\n    \nIn this document. Whenever a resource is described to be created, it may be followed by a list of service accounts with their respective roles.\n\n## Audit Log\n\n1. Turn on audit logging for cloud kms. Admin read and data read.\n\n## Cloud KMS\n\n1. Create keychain credentials.\n    * credentials: Cloud KMS CryptoKey Encrypter/Decrypter\n2. Create key credentials in this keychain.\n\n## PubSub\n\n#### Conventions:\n* If there is only one publisher to the topic: publisher-topic_name\n* If there is more than one publisher: topic_name\n* For any subscription: subscriber_name-full_topic_name (includes publisher if applicable)\n\n#### Resources:\n\n1. Create topics:\n    * credentials-credentials_received\n        * credentials: Pub/Sub Publisher\n    * notifications\n        * marks: Pub/Sub Publisher\n        * credentials: Pub/Sub Publisher\n    * notifier-commands\n        * notifier: Pub/Sub Publisher\n    * notifier-user_created\t\n        * notifier: Pub/Sub Publisher\n2. Create subscriptions:\n    * marks-credentials-credentials_received\n        * marks: Pub/Sub Subscriber, Pub/Sub Viewer\n    * marks-notifier-commands\n        * marks: Pub/Sub Subscriber, Pub/Sub Viewer\n    * notifier-notifications\n        * notifier: Pub/Sub Subscriber, Pub/Sub Viewer\n    * credentials-notifier-user_created\n        * credentials: Pub/Sub Subscriber, Pub/Sub Viewer\n\n## Datastore\n\nYou need to have Datastore activated. The microservices will create necessary kinds as required.\n\n## Kubernetes Engine\n\n#### Non-defaults:\n    * Cluster Version - choose latest\n    * Boot disk size - 20GB\n    * Network policy - Enabled\n    * HTTP load balancing - Disabled\n    \n#### Compute engine:\n    * Turn on https network access to the node, which you will route your DNS to.\n    \n#### Preliminary cluster setup:\n```\n    gcloud config set project usos-notifier\n    gcloud config set compute/zone us-central1-a\n    gcloud container clusters get-credentials cluster-1 --zone us-central1-a\n    kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default\n    helm init\n    kubectl create clusterrolebinding cluster-admin-binding-jakub.wit.martin@gmail.com --clusterrole=cluster-admin --user=jakub.wit.martin@gmail.com\n```\n\n#### Secrets:\n* TLS certs for the nginx controller. Standard PEM. I'm using cloudflare generated ones.\n    * ```kubectl create secret tls tls-secret --key cert.key --cert cert.crt```\n* Credentials service account. Download the json file and call it credentials.json.\n    * ```kubectl create secret generic credentials-service-account --from-file=serviceaccount.json=credentials.json```\n* Marks service account. Download the json file and call it marks.json.\n    * ```kubectl create secret generic marks-service-account --from-file=serviceaccount.json=marks.json```\n* Notifier service account. Download the json file and call it notifier.json.\n    * ```kubectl create secret generic notifier-service-account --from-file=serviceaccount.json=notifier.json```\n* Messenger API key. Put the key into your local NOTIFIER_MESSENGER_API_KEY environment variable.\n    * On Windows: ```kubectl create secret generic messenger-api --from-literal=messenger-api=$ENV:NOTIFIER_MESSENGER_API_KEY```\n    * On Linux: ```kubectl create secret generic messenger-api --from-literal=messenger-api=NOTIFIER_MESSENGER_API_KEY```\n* Messenger Verify key. Put the key into your local NOTIFIER_MESSENGER_VERIFY_TOKEN environment variable.\n    * On Windows: ```kubectl create secret generic messenger-verify --from-literal=messenger-verify=$ENV:NOTIFIER_MESSENGER_VERIFY_TOKEN```\n    * On Linux: ```kubectl create secret generic messenger-verify --from-literal=messenger-verify=NOTIFIER_MESSENGER_VERIFY_TOKEN```\n\n\n#### Infrastructure:\n* Nginx controller. This will create a daemon set of nginx instances. All of them will have hostPort 80 and 443, so just route your DNS to one of your nodes.\n    * ```helm install --values values.yaml --name nginx-ingress stable/nginx-ingress```\n* Ingress. This routes outside traffic to the internal - publicly available - services.\n    * ```kubectl apply -f ingress.yaml```\n\n#### Microservices:\n* Credentials:\n    * ```kubectl apply -f credentials.yaml```\n* Marks:\n    * ```kubectl apply -f marks.yaml```\n* Notifier:\n    * ```kubectl apply -f notifier.yaml```\n    \n    \n#### By the way:\n* If cross-compiling windows -\u003e linux you need to ```go get -u golang.org/x/sys/unix```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcube2222%2Fusos-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcube2222%2Fusos-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcube2222%2Fusos-notifier/lists"}