Skip to content

Commit

Permalink
Remove Civo and Equinix Metal
Browse files Browse the repository at this point in the history
* Civo doesn't provide public IPs or cloud-init
* Equinix Metal is far too expensive for a single inlets tunnel

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jun 12, 2024
1 parent 269e928 commit f98ff84
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 44 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
46 changes: 6 additions & 40 deletions cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")
Expand All @@ -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")
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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" {
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions cmd/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)")

Expand All @@ -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")
Expand Down

0 comments on commit f98ff84

Please sign in to comment.