{"id":13424946,"url":"https://github.com/anthonycorletti/astrobase","last_synced_at":"2025-04-15T00:31:43.164Z","repository":{"id":40635310,"uuid":"296429394","full_name":"anthonycorletti/astrobase","owner":"anthonycorletti","description":"Create kubernetes clusters quickly on GCP, AWS, or Azure.","archived":false,"fork":false,"pushed_at":"2023-02-06T21:23:12.000Z","size":4133,"stargazers_count":67,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T22:41:43.935Z","etag":null,"topics":["astrobase","aws","azure","fastapi","google-cloud","kubernetes","multi-cloud","python3","typer"],"latest_commit_sha":null,"homepage":"https://astrobase.corletti.xyz","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/anthonycorletti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/code_of_conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null}},"created_at":"2020-09-17T19:59:01.000Z","updated_at":"2025-04-08T09:27:40.000Z","dependencies_parsed_at":"2023-02-19T12:15:30.651Z","dependency_job_id":null,"html_url":"https://github.com/anthonycorletti/astrobase","commit_stats":null,"previous_names":["astrobase/astrobase"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonycorletti%2Fastrobase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonycorletti%2Fastrobase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonycorletti%2Fastrobase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anthonycorletti%2Fastrobase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anthonycorletti","download_url":"https://codeload.github.com/anthonycorletti/astrobase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248984315,"owners_count":21193723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["astrobase","aws","azure","fastapi","google-cloud","kubernetes","multi-cloud","python3","typer"],"created_at":"2024-07-31T00:01:01.111Z","updated_at":"2025-04-15T00:31:39.697Z","avatar_url":"https://github.com/anthonycorletti.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://astrobase.corletti.xyz\"\u003e\u003cimg src=\"https://github.com/anthonycorletti/astrobase/blob/main/docs/img/space-logo.png?raw=true\" alt=\"Astrobase\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eAstrobase; Create kubernetes clusters quickly on GCP, AWS, or Azure.\u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/anthonycorletti/astrobase/actions?query=workflow%3Atest\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/anthonycorletti/astrobase/workflows/test/badge.svg\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/anthonycorletti/astrobase/actions?query=workflow%3Apublish\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/anthonycorletti/astrobase/workflows/publish/badge.svg\" alt=\"publish\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/anthonycorletti/astrobase\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/anthonycorletti/astrobase?color=%2334D058\" alt=\"Coverage\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://astrobase.corletti.xyz\" target=\"_blank\"\u003ehttps://astrobase.corletti.xyz\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/anthonycorletti/astrobase\" target=\"_blank\"\u003ehttps://github.com/anthonycorletti/astrobase\u003c/a\u003e\n\n**Twitter**: \u003ca href=\"https://twitter.com/astrobasecloud\" target=\"_blank\"\u003e@astrobasecloud\u003c/a\u003e\n\n---\n\nAstrobase is best for developers who create and manage reproducible environments across cloud providers with Kubernetes.\n\nThe key features are:\n\n* **API First**: Unlike most other infrastructure management tools, Astrobase is an API-First service; meaning you can write any client code you like to create your Kubernetes clusters.\n* **Kubernetes First**: Astrobase only supports Kubernetes so you and your team can focus on streamlining the same application deployment story across any provider envrionment you might need to run your applications on.\n* **Easy to use**: Cluster creation definitions are short and simple, and you don't have to spend hours learning a domain specific language or think about a new resource management lifecycle. Astrobase only does what cloud providers do.\n* **Start simple**: Astrobase's simplest example takes about 5 minutes to complete.\n* **Scale across clouds**: If you're using Astrobase, and shipping your software to customers that use different cloud providers, you can test your deployments seamlessly and take advantage of over **$300,000** in cloud provider credits while doing so.\n\n## Requirements\n\nPython 3.7+\n\nAlternatively, you can run Astrobase as a [docker container](./tutorial/intro.md) incase you arent using python.\n\n## Installation\n\n```sh\npip install astrobasecloud\n```\n\n## A Quick Example\n\n### The absolute minimum\n\nCreate a file `gke-cluster.yaml` that contains the following content.\n\n```yaml\n---\ncluster:\n  name: astrobase-quickstart\n  provider: gcp\n  location: us-central1-c\n  node_pools:\n    - name: default\n      initial_node_count: 1\n      autoscaling:\n        enabled: true\n        min_node_count: 1\n        max_node_count: 3\n```\n\nCreate a project on Google Cloud and link a billing account to the new project.\n\n```sh\nPROJECT_ID=ab-quickstart-$(date +%s)\ngcloud projects create ab-quickstart-$(date +%s)\ngcloud config set project $PROJECT_ID\n```\n\n### Deploy\n\nStart the astrobase server in one terminal session\n\n```sh\nastrobase server\n```\n\nCreate your first profile. A profile points your cli to a particular astrobase server.\n\n```sh\nastrobase profile create local --no-secure \\\nexport ASTROBASE_PROFILE=local\n```\n\nIn another session, setup your GCP project and deploy your cluster!\n\n```sh\nastrobase provider setup gcp \\\n--project-id $(gcloud config get-value project) \\\n--service-name \"container.googleapis.com\"\n```\n\n```sh\nastrobase cluster gke create \\\n--project-id $(gcloud config get-value project) \\\n--file \"gke-cluster.yaml\"\n```\n\nDone!\n\nDownload your credentials and make a request to the cluster once it's in a ready state\n\n```sh\ngcloud container clusters \\\nget-credentials astrobase-quickstart \\\n--zone us-central1-c \u0026\u0026 \\\nkubectl get nodes\n```\n\nNow it's time to clean-up.\n\n```sh\nastrobase cluster gke delete \\\n--project-id $(gcloud config get-value project) \\\n--file \"gke-cluster.yaml\"\ngcloud projects delete $PROJECT_ID\n```\n\n## Going Multi-Cloud\n\n### Two clusters, different clouds\n\nLet's see what it takes to deploy onto two environments using Astrobase. Let's use GCP and AWS for this example.\n\nCreate a file `gke-cluster.yaml` with:\n\n```yaml\n---\ncluster:\n  name: astrobase-quickstart\n  provider: gcp\n  location: us-central1-c\n  node_pools:\n    - name: default\n      initial_node_count: 1\n      autoscaling:\n        enabled: true\n        min_node_count: 1\n        max_node_count: 3\n```\n\nNow create a file `eks-cluster.yaml` with:\n\n```yaml\n---\ncluster:\n  name: astrobase-quickstart\n  provider: eks\n  region: us-east-1\n  nodegroups:\n    - nodegroupName: default\n      scalingConfig:\n        desiredSize: 1\n        minSize: 1\n        maxSize: 3\n```\n\n### Deploy\n\nStart the astrobase server in one terminal session\n\n```sh\nastrobase server\n```\n\nIn another session, setup your GCP project and deploy your cluster!\n\n```sh\nastrobase provider setup gcp \\\n--project-id $(gcloud config get-value project) \\\n--service-name \"container.googleapis.com\"\n```\n\n```sh\nastrobase cluster gke create \\\n--project-id $(gcloud config get-value project) \\\n--file \"gke-cluster.yaml\"\n```\n\nThen deploy your AWS EKS cluster!\n\n```sh\nastrobase cluster eks create \\\n--kubernetes-control-plane-arn=$(aws iam list-roles | jq -r '.Roles[] | select(.RoleName == \"AstrobaseEKSRole\") | .Arn') \\\n--cluster-subnet-id=$(aws ec2 describe-subnets --query 'Subnets[].SubnetId[]' | jq -r '.[0]') \\\n--cluster-subnet-id=$(aws ec2 describe-subnets --query 'Subnets[].SubnetId[]' | jq -r '.[1]') \\\n--cluster-security-group-id=$(aws ec2 describe-security-groups --query 'SecurityGroups[].GroupId' | jq -r '.[0]') \\\n--nodegroup-noderole-mapping=\"default=$(aws iam list-roles | jq -r '.Roles[] | select(.RoleName == \"AstrobaseEKSNodegroupRole\") | .Arn')\" \\\n--file \"eks-cluster.yaml\"\n```\n\nDeploying your EKS cluster requires a little extra setup. Checkout the [AWS user guide section](./tutorial/aws/intro) for more details.\n\nNow it's time to clean-up.\n\n```sh\nastrobase cluster gke delete \\\n--project-id $(gcloud config get-value project) \\\n--file \"gke-cluster.yaml\"\n```\n\n```sh\nastrobase cluster eks delete \\\n--kubernetes-control-plane-arn=$(aws iam list-roles | jq -r '.Roles[] | select(.RoleName == \"AstrobaseEKSRole\") | .Arn') \\\n--cluster-subnet-id=$(aws ec2 describe-subnets --query 'Subnets[].SubnetId[]' | jq -r '.[0]') \\\n--cluster-subnet-id=$(aws ec2 describe-subnets --query 'Subnets[].SubnetId[]' | jq -r '.[1]') \\\n--cluster-security-group-id=$(aws ec2 describe-security-groups --query 'SecurityGroups[].GroupId' | jq -r '.[0]') \\\n--nodegroup-noderole-mapping=\"default=$(aws iam list-roles | jq -r '.Roles[] | select(.RoleName == \"AstrobaseEKSNodegroupRole\") | .Arn')\" \\\n--file \"eks-cluster.yaml\"\n```\n\n\n## Recap\n\nIn summary, Astrobase makes it incredibly simple to create multiple kubernetes environments in different cloud providers.\n\nYou don't have to learn a new language, you can extend the api if you need, deploy Astrobase into your cloud architecture, or simply run it locally.\n\nFor a more complete example including more features and detail, [continue reading the user guide](./tutorial/intro.md).\n\n## License\n\nThis project is licensed under the [Apache 2.0 License](https://github.com/anthonycorletti/astrobase/blob/main/LICENSE).\n","funding_links":[],"categories":["Projects","Python"],"sub_categories":["Open Source Projects"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonycorletti%2Fastrobase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanthonycorletti%2Fastrobase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanthonycorletti%2Fastrobase/lists"}