Package: astrobasecloud
Astrobase; simple, fast, and secure deployments anywhere.Documentation:https://docs.astrobase.cloudSource Code:https://github.com/astrobase/astrobaseAstrobase is best for developers who create and manage reproducible environments across cloud providers with Kubernetes.The key features are: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.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.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.Start simple: Astrobase's simplest example takes about 5 minutes to complete.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,000in cloud provider credits while doing so.RequirementsPython 3.7+Alternatively, you can run Astrobase as adocker containerincase you arent using python.InstallationpipinstallastrobasecloudA Quick ExampleThe absolute minimumCreate a filegke-cluster.yamlthat contains the following content.---cluster:name:astrobase-quickstartprovider:gcplocation:us-central1-cnode_pools:-name:defaultinitial_node_count:1autoscaling:enabled:truemin_node_count:1max_node_count:3Create a project on Google Cloud and link a billing account to the new project.PROJECT_ID=ab-quickstart-$(date+%s)gcloudprojectscreateab-quickstart-$(date+%s)gcloudconfigsetproject$PROJECT_IDDeployStart the astrobase server in one terminal sessionastrobaseserverCreate your first profile. A profile points your cli to a particular astrobase server.astrobaseprofilecreatelocal--no-secure\exportASTROBASE_PROFILE=localIn another session, setup your GCP project and deploy your cluster!astrobaseprovidersetupgcp\--project-id$(gcloudconfigget-valueproject)\--service-name"container.googleapis.com"astrobaseclustergkecreate\--project-id$(gcloudconfigget-valueproject)\--file"gke-cluster.yaml"Done!Download your credentials and make a request to the cluster once it's in a ready stategcloudcontainerclusters\get-credentialsastrobase-quickstart\--zoneus-central1-c&&\kubectlgetnodesNow it's time to clean-up.astrobaseclustergkedelete\--project-id$(gcloudconfigget-valueproject)\--file"gke-cluster.yaml"gcloudprojectsdelete$PROJECT_IDGoing Multi-CloudTwo clusters, different cloudsLet's see what it takes to deploy onto two environments using Astrobase. Let's use GCP and AWS for this example.Create a filegke-cluster.yamlwith:---cluster:name:astrobase-quickstartprovider:gcplocation:us-central1-cnode_pools:-name:defaultinitial_node_count:1autoscaling:enabled:truemin_node_count:1max_node_count:3Now create a fileeks-cluster.yamlwith:---cluster:name:astrobase-quickstartprovider:eksregion:us-east-1nodegroups:-nodegroupName:defaultscalingConfig:desiredSize:1minSize:1maxSize:3DeployStart the astrobase server in one terminal sessionastrobaseserverIn another session, setup your GCP project and deploy your cluster!astrobaseprovidersetupgcp\--project-id$(gcloudconfigget-valueproject)\--service-name"container.googleapis.com"astrobaseclustergkecreate\--project-id$(gcloudconfigget-valueproject)\--file"gke-cluster.yaml"Then deploy your AWS EKS cluster!astrobaseclusterekscreate\--kubernetes-control-plane-arn=$(awsiamlist-roles|jq-r'.Roles[] | select(.RoleName == "AstrobaseEKSRole") | .Arn')\--cluster-subnet-id=$(awsec2describe-subnets--query'Subnets[].SubnetId[]'|jq-r'.[0]')\--cluster-subnet-id=$(awsec2describe-subnets--query'Subnets[].SubnetId[]'|jq-r'.[1]')\--cluster-security-group-id=$(awsec2describe-security-groups--query'SecurityGroups[].GroupId'|jq-r'.[0]')\--nodegroup-noderole-mapping="default=$(awsiamlist-roles|jq-r'.Roles[] | select(.RoleName == "AstrobaseEKSNodegroupRole") | .Arn')"\--file"eks-cluster.yaml"Deploying your EKS cluster requires a little extra setup. Checkout theAWS user guide sectionfor more details.Now it's time to clean-up.astrobaseclustergkedelete\--project-id$(gcloudconfigget-valueproject)\--file"gke-cluster.yaml"astrobaseclustereksdelete\--kubernetes-control-plane-arn=$(awsiamlist-roles|jq-r'.Roles[] | select(.RoleName == "AstrobaseEKSRole") | .Arn')\--cluster-subnet-id=$(awsec2describe-subnets--query'Subnets[].SubnetId[]'|jq-r'.[0]')\--cluster-subnet-id=$(awsec2describe-subnets--query'Subnets[].SubnetId[]'|jq-r'.[1]')\--cluster-security-group-id=$(awsec2describe-security-groups--query'SecurityGroups[].GroupId'|jq-r'.[0]')\--nodegroup-noderole-mapping="default=$(awsiamlist-roles|jq-r'.Roles[] | select(.RoleName == "AstrobaseEKSNodegroupRole") | .Arn')"\--file"eks-cluster.yaml"RecapIn summary, Astrobase makes it incredibly simple to create multiple kubernetes environments in different cloud providers.You 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.For a more complete example including more features and detail,continue reading the user guide.LicenseThis project is licensed under theApache 2.0 License.