{"id":15956011,"url":"https://github.com/crcsmnky/weatherinfo","last_synced_at":"2026-04-01T22:05:11.064Z","repository":{"id":49964779,"uuid":"177005425","full_name":"crcsmnky/weatherinfo","owner":"crcsmnky","description":"A simple app that displays the weather for single or multiple cities. Perfect for testing Kubernetes and/or Istio!","archived":false,"fork":false,"pushed_at":"2023-02-16T03:09:54.000Z","size":37,"stargazers_count":21,"open_issues_count":13,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-28T00:37:52.066Z","etag":null,"topics":["flask","istio","kubernetes","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crcsmnky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-03-21T18:46:29.000Z","updated_at":"2024-10-26T20:42:54.000Z","dependencies_parsed_at":"2024-10-27T15:16:33.280Z","dependency_job_id":"d0b753fa-6e98-4d05-824f-8fa9c9f63a1c","html_url":"https://github.com/crcsmnky/weatherinfo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/crcsmnky/weatherinfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcsmnky%2Fweatherinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcsmnky%2Fweatherinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcsmnky%2Fweatherinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcsmnky%2Fweatherinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crcsmnky","download_url":"https://codeload.github.com/crcsmnky/weatherinfo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crcsmnky%2Fweatherinfo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: 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":["flask","istio","kubernetes","python"],"created_at":"2024-10-07T13:28:09.679Z","updated_at":"2026-04-01T22:05:11.040Z","avatar_url":"https://github.com/crcsmnky.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What's the Weather?\n\nThis is a sample app meant for use with Kubernetes and/or Istio. It displays the weather from a single city (Austin, TX) or multiple cities (Austin, New York, San Francisco, Seattle).\n\n## Building\n\nThe images can be built using [Docker](http://docker.com) or using [Cloud Build](http://cloud.google.com/cloud-build). To build an invidual image, refer to the following example:\n\n`gcloud builds submit --tag gcr.io/[PROJECTID]/weather-frontend:1.0 frontend/`\n\nOr to build all of the images, run `build-images.sh`.\n\n## Deploying\n\nThere are deployment specifications for Kubernetes and Istio in `manifests`. Before proceeding, you will need an API key from [OpenWeatherMap](http://openweathermap.org/api).\n\nOnce you have your API key, add a `Secret` to your Kubernetes cluster:\n- `kubectl create secret generic openweathermap --from-literal=apikey=[OPENWEATHERMAP-API-KEY]`\n\n### Kubernetes\n\nTo deploy the app to Kubernetes (without Istio), use the following commands:\n- `kubectl apply -f manifests/weather-deployment.yaml`\n\n*Note*: the Services are not externally accessible (no Ingress resource is created) so to access `weather-frontend` you'll need to use port forwarding and open [http://localhost:5000](http://localhost:5000):\n- `kubectl port-forward deployment/weather-frontend 5000:5000`\n\n### Kubernetes and Istio\n\nOnce you have created a Kubernetes cluster and installed Istio, you can deploy the sample app as follows.\n\nFirst, enable auto-injection of the Envoy `istio-proxy`:\n- `kubectl label ns default istio-injection=enabled`\n\nThen deploy the rules first and the app second:\n- `kubectl apply -f manifests/weather-rules.yaml`\n- `kubectl apply -f manifests/weather-deployment.yaml`\n\nNow grab the `istio-ingressgateway` Load Balancer IP address:\n- `INGRESSGATEWAY=$(kubectl get svc -n istio-system istio-ingressgateway -o jsonpath=\"{.status.loadBalancer.ingress..ip}\")`\n- Open `http://$INGRESSGATEWAY` in a browser\n\n*Note:* If you do not want to enable auto-injection of `istio-proxy` for the `default` namespace, you can also use `istioctl` to include `istio-proxy` in your Pods:\n- `kubectl apply -f \u003c(istioctl kube-inject -f manifests/weather-deployment.yaml)`\n\n## Generating Load\n\nThis repo also contains a [Locust](http://locust.io) script to generate load against `weather-frontend`. \n\n**IMPORTANT**\n- The `loadgenerator` deployment is set to hit `weather-frontend.default:5000` and not `$INGRESSGATEWAY` therefore the traffic is coming from within the cluster\n- The `loadgenerator` is configured as a single replica with `5` clients randomly generating requests every 1-5s. *Keep this in mind so you don't go over your OpenWeatherMap API Key quota*.\n\nTo deploy `loadgenerator`, update `FRONTEND_HOST` in `manifests/loadgen.yaml` and then apply:\n- `kubectl apply -f manifests/loadgen.yaml`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrcsmnky%2Fweatherinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrcsmnky%2Fweatherinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrcsmnky%2Fweatherinfo/lists"}