Skip to content

Commit 8410cf0

Browse files
committed
Upgrade AMI image for EC2
A user reported that the 20.04 image was no longer available on AWS. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 619f0c7 commit 8410cf0

File tree

6 files changed

+106
-74
lines changed

6 files changed

+106
-74
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
- name: Install Go
1919
uses: actions/setup-go@master
2020
with:
21-
go-version: 1.19.x
21+
go-version: 1.20.x
2222
- name: Make
2323
run: make all

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Install Go
1616
uses: actions/setup-go@master
1717
with:
18-
go-version: 1.19.x
18+
go-version: 1.20.x
1919
- name: Make
2020
run: make all
2121

cmd/create.go

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/spf13/cobra"
2020
)
2121

22-
const inletsProDefaultVersion = "0.9.18"
22+
const inletsProDefaultVersion = "0.9.21"
2323
const inletsProControlPort = 8123
2424

2525
func init() {
@@ -49,7 +49,7 @@ func init() {
4949
createCmd.Flags().String("endpoint", "ovh-eu", "API endpoint (ovh), default: ovh-eu")
5050
createCmd.Flags().String("consumer-key", "", "The Consumer Key for using the OVH API")
5151

52-
createCmd.Flags().Bool("tcp", true, `Provision an exit-server with inlets Pro running as a TCP server`)
52+
createCmd.Flags().Bool("tcp", true, `Provision an exit-server with inlets running as a TCP server`)
5353

5454
createCmd.Flags().StringArray("letsencrypt-domain", []string{}, `Domains you want to get a Let's Encrypt certificate for`)
5555
createCmd.Flags().String("letsencrypt-issuer", "prod", `The issuer endpoint to use with Let's Encrypt - \"prod\" or \"staging\"`)
@@ -59,22 +59,35 @@ func init() {
5959
_ = createCmd.Flags().MarkHidden("pro")
6060
createCmd.Flags().DurationP("poll", "n", time.Second*2, "poll every N seconds, use a higher value if you encounter rate-limiting")
6161

62-
createCmd.Flags().String("inlets-pro-version", inletsProDefaultVersion, `Binary release version for inlets Pro`)
63-
62+
createCmd.Flags().String("inlets-version", inletsProDefaultVersion, `Binary release version for inlets`)
6463
}
6564

6665
// clientCmd represents the client sub command.
6766
var createCmd = &cobra.Command{
6867
Use: "create",
69-
Short: "Create an exit-server with inlets Pro preinstalled.",
70-
Long: `Create an exit-server with inlets Pro preinstalled on cloud infrastructure
71-
with inlets Pro preloaded as a systemd service. The estimated cost of each
68+
Short: "Create an exit-server with inlets preinstalled.",
69+
Long: `Create an exit-server with inlets preinstalled on cloud infrastructure
70+
with inlets preloaded as a systemd service. The estimated cost of each
7271
VM along with what OS version and spec will be used is explained in the
7372
project docs.`,
74-
Example: ` inletsctl create \
73+
Example: ` # Create a TCP tunnel server
74+
inletsctl create \
7575
--provider [digitalocean|equinix-metal|ec2|scaleway|civo|gce|azure|linode|hetzner] \
7676
--access-token-file $HOME/access-token \
77-
--region lon1`,
77+
--region lon1
78+
79+
# Create a HTTPS tunnel server, terminating TLS with a certificate
80+
# from Let's Encrypt
81+
inletsctl create \
82+
--letsencrypt-domain inlets.example.com \
83+
--letsencrypt-email [email protected]
84+
85+
# Create a HTTPS tunnel server with multiple domains
86+
inletsctl create \
87+
--letsencrypt-domain tunnel1.example.com \
88+
--letsencrypt-domain tunnel2.example.com \
89+
--letsencrypt-email [email protected]
90+
`,
7891
RunE: runCreate,
7992
SilenceUsage: true,
8093
SilenceErrors: true,
@@ -264,10 +277,11 @@ func runCreate(cmd *cobra.Command, _ []string) error {
264277
}
265278
}
266279

267-
inletsProVersion, err := cmd.Flags().GetString("inlets-pro-version")
280+
inletsProVersion, err := cmd.Flags().GetString("inlets-version")
268281
if err != nil {
269282
return err
270283
}
284+
271285
if len(inletsProVersion) == 0 {
272286
inletsProVersion = inletsProDefaultVersion
273287
}
@@ -336,7 +350,7 @@ func runCreate(cmd *cobra.Command, _ []string) error {
336350

337351
if hostStatus.Status == "active" {
338352
if len(letsencryptDomains) > 0 {
339-
fmt.Printf(`inlets Pro HTTPS (%s) server summary:
353+
fmt.Printf(`inlets HTTPS (%s) server summary:
340354
IP: %s
341355
HTTPS Domains: %v
342356
Auth-token: %s
@@ -368,7 +382,7 @@ To delete:
368382

369383
return nil
370384
} else {
371-
fmt.Printf(`inlets Pro TCP (%s) server summary:
385+
fmt.Printf(`inlets TCP (%s) server summary:
372386
IP: %s
373387
Auth-token: %s
374388
@@ -527,7 +541,7 @@ func createHost(provider, name, region, zone, projectID, userData, inletsPort st
527541

528542
return &provision.BasicHost{
529543
Name: name,
530-
OS: "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210621",
544+
OS: "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20230516",
531545
Plan: "t3.nano",
532546
Region: region,
533547
UserData: base64.StdEncoding.EncodeToString([]byte(userData)),

cmd/download.go

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
)
1616

1717
var (
18-
inletsPro bool
1918
downloadVersion string
2019
destination string
2120
verbose bool
@@ -24,7 +23,6 @@ var (
2423
func init() {
2524
inletsCmd.AddCommand(downloadCmd)
2625

27-
downloadCmd.Flags().BoolVar(&inletsPro, "pro", true, "Download inlets Pro")
2826
downloadCmd.Flags().StringVar(&downloadVersion, "version", "", "specific version to download")
2927
downloadCmd.Flags().StringVar(&destination, "download-to", "/usr/local/bin", "location to download to (Default: /usr/local/bin)")
3028
downloadCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "Show download URL")
@@ -33,12 +31,11 @@ func init() {
3331

3432
var downloadCmd = &cobra.Command{
3533
Use: "download",
36-
Short: "Downloads the inlets Pro binary",
37-
Long: `Downloads the inlets Pro binary from the GitHub releases page. Only inlets Pro is supported.`,
34+
Short: "Downloads the inlets binary",
35+
Long: `Downloads the inlets binary from the GitHub releases page..`,
3836
Example: ` inletsctl download
39-
inletsctl download --version 0.2.6
40-
inletsctl download --pro --version 0.2.6
41-
inletsctl download --pro`,
37+
inletsctl download --version 0.2.6
38+
`,
4239
RunE: downloadInlets,
4340
SilenceUsage: true,
4441
SilenceErrors: true,
@@ -48,15 +45,9 @@ func downloadInlets(_ *cobra.Command, _ []string) error {
4845

4946
var versionUrl, downloadUrl, binaryName string
5047

51-
if inletsPro {
52-
versionUrl = "https://github.com/inlets/inlets-pro/releases/latest"
53-
downloadUrl = "https://github.com/inlets/inlets-pro/releases/download/"
54-
binaryName = "inlets-pro"
55-
} else {
56-
versionUrl = "https://github.com/inlets/inlets-pro/releases/latest"
57-
downloadUrl = "https://github.com/inlets/inlets-pro/releases/download/"
58-
binaryName = "inlets-pro"
59-
}
48+
versionUrl = "https://github.com/inlets/inlets-pro/releases/latest"
49+
downloadUrl = "https://github.com/inlets/inlets-pro/releases/download/"
50+
binaryName = "inlets-pro"
6051

6152
osVal := runtime.GOOS
6253
arch := runtime.GOARCH

go.mod

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/inlets/inletsctl
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/alexellis/go-execute v0.5.0
@@ -17,7 +17,7 @@ require (
1717
// replace github.com/inlets/cloud-provision => ../cloud-provision
1818

1919
require (
20-
cloud.google.com/go/compute v1.14.0 // indirect
20+
cloud.google.com/go/compute v1.20.1 // indirect
2121
cloud.google.com/go/compute/metadata v0.2.3 // indirect
2222
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.3 // indirect
2323
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 // indirect
@@ -28,18 +28,19 @@ require (
2828
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect
2929
github.com/aws/aws-sdk-go v1.44.191 // indirect
3030
github.com/beorn7/perks v1.0.1 // indirect
31-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
31+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
3232
github.com/digitalocean/godo v1.95.0 // indirect
3333
github.com/dimchansky/utfbom v1.1.1 // indirect
3434
github.com/dirien/ovh-go-sdk v0.2.0 // indirect
3535
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect
3636
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
3737
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
38-
github.com/golang/protobuf v1.5.2 // indirect
38+
github.com/golang/protobuf v1.5.3 // indirect
3939
github.com/google/go-querystring v1.1.0 // indirect
40+
github.com/google/s2a-go v0.1.4 // indirect
4041
github.com/google/uuid v1.3.0 // indirect
41-
github.com/googleapis/enterprise-certificate-proxy v0.2.1 // indirect
42-
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
42+
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
43+
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
4344
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
4445
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
4546
github.com/hetznercloud/hcloud-go v1.39.0 // indirect
@@ -57,17 +58,17 @@ require (
5758
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12 // indirect
5859
github.com/vultr/govultr/v2 v2.17.2 // indirect
5960
go.opencensus.io v0.24.0 // indirect
60-
golang.org/x/crypto v0.8.0 // indirect
61-
golang.org/x/net v0.9.0 // indirect
62-
golang.org/x/oauth2 v0.7.0 // indirect
63-
golang.org/x/sys v0.7.0 // indirect
64-
golang.org/x/text v0.9.0 // indirect
61+
golang.org/x/crypto v0.12.0 // indirect
62+
golang.org/x/net v0.14.0 // indirect
63+
golang.org/x/oauth2 v0.11.0 // indirect
64+
golang.org/x/sys v0.11.0 // indirect
65+
golang.org/x/text v0.12.0 // indirect
6566
golang.org/x/time v0.3.0 // indirect
66-
google.golang.org/api v0.109.0 // indirect
67+
google.golang.org/api v0.126.0 // indirect
6768
google.golang.org/appengine v1.6.7 // indirect
68-
google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect
69-
google.golang.org/grpc v1.51.0 // indirect
70-
google.golang.org/protobuf v1.28.1 // indirect
69+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
70+
google.golang.org/grpc v1.55.0 // indirect
71+
google.golang.org/protobuf v1.31.0 // indirect
7172
gopkg.in/ini.v1 v1.66.6 // indirect
7273
gopkg.in/yaml.v2 v2.4.0 // indirect
7374
)

0 commit comments

Comments
 (0)