diff --git a/README.md b/README.md index 7da1b528..8b09bb73 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The `inletsctl create` command will provision a cloud host with the provider and The [provision](https://github.com/inlets/inletsctl/tree/master/pkg/provision) package contains defaults for OS images to use and for cloud host plans and sizing. You'll find all available options on `inletsctl create --help` -The cost for cloud hosts varies depending on a number of factors such as the region, bandwidth used, and so forth. A rough estimation is that it could cost around 5 USD / month to host a VM on for DigitalOcean, Civo, or Scaleway. The VM is required to provide your public IP. Some hosting providers supply credits and a free-tier such as GCE and AWS. +The cost for cloud hosts varies depending on a number of factors such as the region, bandwidth used, and so forth. A rough estimation is that it could cost around 5 USD / month to host a VM on for DigitalOcean, or Scaleway. The VM is required to provide your public IP. Some hosting providers supply credits and a free-tier such as GCE and AWS. See the pricing grid on the [inlets-operator](https://github.com/inlets/inlets-operator#provider-pricing) for a detailed breakdown. @@ -104,7 +104,7 @@ Why is inletsctl a separate binary? This tool is shipped separately, so that the ### Provisioners -inletsctl can provision exit-servers to the following providers: DigitalOcean, Scaleway, Civo.com, Google Cloud, Equinix Metal, AWS EC2, Azure, Linode, Hetzner and Vultr. +inletsctl can provision exit-servers to the following providers: DigitalOcean, Scaleway, Google Cloud, AWS EC2, Azure, Linode, Hetzner, and Vultr. An open-source Go package named [provision](https://github.com/inlets/cloud-provision) can be extended for each new provider. This code can be used outside of inletsctl by other projects wishing to create hosts and to run some scripts upon start-up via userdata. diff --git a/cmd/create.go b/cmd/create.go index 2e1c1f36..c23a6924 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -26,7 +26,7 @@ func init() { inletsCmd.AddCommand(createCmd) - createCmd.Flags().StringP("provider", "p", "digitalocean", "The cloud provider - digitalocean, gce, ec2, azure, equinix-metal, scaleway, linode, civo, hetzner, ovh or vultr") + createCmd.Flags().StringP("provider", "p", "digitalocean", "The cloud provider - digitalocean, gce, ec2, azure, scaleway, linode, hetzner, ovh or vultr") createCmd.Flags().StringP("region", "r", "lon1", "The region for your cloud provider") createCmd.Flags().StringP("plan", "s", "", "The plan or size for your cloud instance") createCmd.Flags().StringP("zone", "z", "us-central1-a", "The zone for the exit-server (gce)") @@ -43,7 +43,7 @@ func init() { createCmd.Flags().String("session-token-file", "", "Read this file for the session token for ec2 (when using with temporary credentials)") createCmd.Flags().String("organisation-id", "", "Organisation ID (scaleway)") - createCmd.Flags().String("project-id", "", "Project ID (equinix-metal, gce, ovh)") + createCmd.Flags().String("project-id", "", "Project ID (gce, ovh)") createCmd.Flags().String("subscription-id", "", "Subscription ID (Azure)") createCmd.Flags().String("endpoint", "ovh-eu", "API endpoint (ovh), default: ovh-eu") @@ -82,7 +82,7 @@ project docs.`, inletsctl create \ ssh-tunnel \ --tcp \ - --provider [digitalocean|equinix-metal|ec2|scaleway|civo|gce|azure|linode|hetzner] \ + --provider [digitalocean|ec2|scaleway|gce|azure|linode|hetzner] \ --access-token-file $HOME/access-token \ --region lon1 @@ -98,9 +98,6 @@ project docs.`, SilenceErrors: true, } -// EquinixMetalProvider is a constant string for Equinix Metal -const EquinixMetalProvider = "equinix-metal" - func runCreate(cmd *cobra.Command, _ []string) error { // Get name from the Args, if not provided, generate a random name @@ -133,11 +130,6 @@ func runCreate(cmd *cobra.Command, _ []string) error { return err } - // Migrate to new name - if provider == "packet" { - provider = EquinixMetalProvider - } - serverMode := "L4 TCP" if !tcp { serverMode = "L7 HTTPS" @@ -189,8 +181,6 @@ func runCreate(cmd *cobra.Command, _ []string) error { region = "lon1" } else if provider == "scaleway" { region = "fr-par-1" - } else if provider == EquinixMetalProvider { - region = "ams1" } else if provider == "ec2" { region = "eu-west-1" } else if provider == "hetzner" { @@ -262,7 +252,7 @@ func runCreate(cmd *cobra.Command, _ []string) error { } } - } else if provider == "gce" || provider == EquinixMetalProvider { + } else if provider == "gce" { projectID, _ = cmd.Flags().GetString("project-id") if len(projectID) == 0 { return fmt.Errorf("--project-id flag must be set") @@ -436,10 +426,6 @@ func getProvisioner(provider, accessToken, secretKey, organisationID, region, su switch provider { case "digitalocean": return provision.NewDigitalOceanProvisioner(accessToken) - case EquinixMetalProvider: - return provision.NewEquinixMetalProvisioner(accessToken) - case "civo": - return provision.NewCivoProvisioner(accessToken) case "scaleway": return provision.NewScalewayProvisioner(accessToken, secretKey, organisationID, region) case "gce": @@ -480,23 +466,12 @@ func createHost(provider, name, region, zone, projectID, userData, inletsProCont } else if provider == "ovh" { return &provision.BasicHost{ Name: name, - OS: "Ubuntu 20.04", + OS: "Ubuntu 22.04", Plan: "s1-2", Region: region, UserData: userData, Additional: map[string]string{}, }, nil - } else if provider == EquinixMetalProvider { - return &provision.BasicHost{ - Name: name, - OS: "ubuntu_20_04", - Plan: "c3.small.x86", - Region: region, - UserData: userData, - Additional: map[string]string{ - "project_id": projectID, - }, - }, nil } else if provider == "scaleway" { return &provision.BasicHost{ Name: name, @@ -506,16 +481,7 @@ func createHost(provider, name, region, zone, projectID, userData, inletsProCont UserData: userData, Additional: map[string]string{}, }, nil - } else if provider == "civo" { - const ubuntu2004ID = "d927ad2f-5073-4ed6-b2eb-b8e61aef29a8" - return &provision.BasicHost{ - Name: name, - OS: ubuntu2004ID, - Plan: "g3.xsmall", - Region: region, - UserData: userData, - Additional: map[string]string{}, - }, nil + } else if provider == "gce" { return &provision.BasicHost{ Name: name, diff --git a/cmd/delete.go b/cmd/delete.go index 5c18e58c..855464e1 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -14,7 +14,7 @@ import ( func init() { inletsCmd.AddCommand(deleteCmd) - deleteCmd.Flags().StringP("provider", "p", "digitalocean", "The cloud provider - digitalocean, gce, ec2, azure, equinix-metal, scaleway, linode, civo, hetzner or vultr") + deleteCmd.Flags().StringP("provider", "p", "digitalocean", "The cloud provider - digitalocean, gce, ec2, azure, scaleway, linode, hetzner or vultr") deleteCmd.Flags().StringP("region", "r", "lon1", "The region for your cloud provider") deleteCmd.Flags().StringP("zone", "z", "us-central1-a", "The zone for the exit node (gce)") @@ -30,7 +30,7 @@ func init() { deleteCmd.Flags().String("session-token-file", "", "Read this file for the session token for ec2 (when using with temporary credentials)") deleteCmd.Flags().String("organisation-id", "", "Organisation ID (scaleway)") - deleteCmd.Flags().String("project-id", "", "Project ID (equinix-metal, gce)") + deleteCmd.Flags().String("project-id", "", "Project ID (gce)") deleteCmd.Flags().String("subscription-id", "", "Subscription ID (azure)") deleteCmd.Flags().String("endpoint", "ovh-eu", "API endpoint (ovh), default: ovh-eu")