Skip to content

Commit

Permalink
Update DigitalOcean image
Browse files Browse the repository at this point in the history
Closes: #128 and fixes issue reported by @richardcase where
the 18.04 image had been deleted by DigitalOcean.

The same work had been completed for GCP/AWS recently.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Jan 21, 2024
1 parent e321cf4 commit 4767821
Show file tree
Hide file tree
Showing 2,631 changed files with 1,416,974 additions and 63 deletions.
49 changes: 28 additions & 21 deletions cmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,25 @@ const EquinixMetalProvider = "equinix-metal"

func runCreate(cmd *cobra.Command, _ []string) error {

inletsProVersion, err := cmd.Flags().GetString("inlets-version")
if err != nil {
return err
}

if len(inletsProVersion) == 0 {
inletsProVersion = inletsProDefaultVersion
}

tcp := true

if cmd.Flags().Changed("pro") {
fmt.Printf("WARN: --pro is deprecated, use --tcp instead.")
tcp, _ = cmd.Flags().GetBool("pro")
}
if cmd.Flags().Changed("tcp") {
tcp, _ = cmd.Flags().GetBool("tcp")
}

awsKeyName, err := cmd.Flags().GetString("aws-key-name")
if err != nil {
return err
Expand All @@ -114,7 +133,14 @@ func runCreate(cmd *cobra.Command, _ []string) error {
provider = EquinixMetalProvider
}

fmt.Printf("Using provider: %s\n", provider)
serverMode := "L4 TCP"
if !tcp {
serverMode = "L7 HTTPS"
}

fmt.Printf("inletsctl version: %v\nTunnel server: %s\tProvider: %s\tVersion: %s\n",
getVersion(),
serverMode, provider, inletsProVersion)

inletsToken, err := cmd.Flags().GetString("inlets-token")
if err != nil {
Expand Down Expand Up @@ -261,16 +287,6 @@ func runCreate(cmd *cobra.Command, _ []string) error {
return err
}

tcp := true

if cmd.Flags().Changed("pro") {
fmt.Printf("WARN: --pro is deprecated, use --tcp instead.")
tcp, _ = cmd.Flags().GetBool("pro")
}
if cmd.Flags().Changed("tcp") {
tcp, _ = cmd.Flags().GetBool("tcp")
}

letsencryptDomains, _ := cmd.Flags().GetStringArray("letsencrypt-domain")
letsencryptEmail, _ := cmd.Flags().GetString("letsencrypt-email")
letsencryptIssuer, _ := cmd.Flags().GetString("letsencrypt-issuer")
Expand All @@ -285,15 +301,6 @@ func runCreate(cmd *cobra.Command, _ []string) error {
tcp = false
}

inletsProVersion, err := cmd.Flags().GetString("inlets-version")
if err != nil {
return err
}

if len(inletsProVersion) == 0 {
inletsProVersion = inletsProDefaultVersion
}

name := strings.Replace(names.GetRandomName(10), "_", "-", -1)

var userData string
Expand Down Expand Up @@ -457,7 +464,7 @@ func createHost(provider, name, region, zone, projectID, userData, inletsProCont
if provider == "digitalocean" {
return &provision.BasicHost{
Name: name,
OS: "ubuntu-18-04-x64",
OS: "ubuntu-22-04-x64",
Plan: "s-1vcpu-1gb",
Region: region,
UserData: userData,
Expand Down
2 changes: 1 addition & 1 deletion cmd/inletsctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

var (
// Version as per git repo
Version string
Version string = "dev"

// GitCommit as per git repo
GitCommit string
Expand Down
90 changes: 49 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,74 +1,82 @@
module github.com/inlets/inletsctl

go 1.20
go 1.21

require (
github.com/alexellis/go-execute/v2 v2.0.0
github.com/alexellis/go-execute/v2 v2.2.1
github.com/golang/mock v1.6.0
github.com/inlets/cloud-provision v0.6.8
github.com/linode/linodego v1.12.0
github.com/linode/linodego v1.27.1
github.com/morikuni/aec v1.0.0
github.com/pkg/errors v0.9.1
github.com/sethvargo/go-password v0.2.0
github.com/spf13/cobra v1.7.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
)

// replace github.com/inlets/cloud-provision => ../cloud-provision

require (
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go/compute v1.23.3 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.3 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.0.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect
github.com/aws/aws-sdk-go v1.44.191 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork v1.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
github.com/aws/aws-sdk-go v1.50.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/digitalocean/godo v1.95.0 // indirect
github.com/digitalocean/godo v1.108.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/dirien/ovh-go-sdk v0.2.0 // indirect
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-resty/resty/v2 v2.11.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/google/s2a-go v0.1.7 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
github.com/hetznercloud/hcloud-go v1.39.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hetznercloud/hcloud-go v1.53.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/ovh/go-ovh v1.3.0 // indirect
github.com/packethost/packngo v0.29.0 // indirect
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 // indirect
github.com/prometheus/client_golang v1.13.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/ovh/go-ovh v1.4.3 // indirect
github.com/packethost/packngo v0.31.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22 // indirect
github.com/vultr/govultr/v2 v2.17.2 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
google.golang.org/grpc v1.55.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/api v0.157.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit 4767821

Please sign in to comment.