Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCE: Update Image to Ubuntu 20_04 #101

Merged
merged 1 commit into from
Jul 9, 2021
Merged

GCE: Update Image to Ubuntu 20_04 #101

merged 1 commit into from
Jul 9, 2021

Conversation

dirien
Copy link
Contributor

@dirien dirien commented Jul 8, 2021

Overall issue -> #95

Signed-off-by: Engin Diri engin.diri@mail.schwarz

Description

Update Ubuntu images to 20.04 for the GCE provider

How Has This Been Tested?

go run main.go create -p gce --project-id=$PROJECTID -f=key.json
Using provider: gce
Requesting host: fervent-turing5 in us-central1-a, from gce
2021/07/08 08:12:13 Creating firewall rule: inlets
Host: fervent-turing5|us-central1-a|central-element-274017, status: provisioning
[1/500] Host: fervent-turing5|us-central1-a|central-element-274017, status: STAGING
[2/500] Host: fervent-turing5|us-central1-a|central-element-274017, status: STAGING
[3/500] Host: fervent-turing5|us-central1-a|central-element-274017, status: STAGING
[4/500] Host: fervent-turing5|us-central1-a|central-element-274017, status: STAGING
[5/500] Host: fervent-turing5|us-central1-a|central-element-274017, status: active
inlets PRO TCP (0.8.3) server summary:
  IP: 35.224.50.33
  Auth-token:

Create the inlets exit node:

inlets-pro tcp client --url "wss://35.224.50.33:8123" \
  --token "AkxuuNfu3xLOJHNURiJRnLdJx19JET13I67nZslYFkYUvPC7J55ckxzDggqznqQD" \
  --upstream $UPSTREAM \
  --ports $PORTS
2021/07/08 08:13:23 Starting TCP client. Version 0.8.5 - 8db64ded51b1455cf4ad027c52bc9cfbeb55c4b3
2021/07/08 08:13:23 Licensed to: Free trial <contact@openfaas.com>, expires: 29 day(s)
2021/07/08 08:13:23 Upstream server: localhost, for ports: 8080
inlets-pro client. Copyright Alex Ellis, OpenFaaS Ltd 2020
INFO[2021/07/08 08:13:24] Connecting to proxy                           url="wss://35.224.50.33:8123/connect"
INFO[2021/07/08 08:13:25] Connection established.. OK.

Test local service:

curl 35.224.50.33:8080
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

How are existing users impacted? What migration steps/scripts do we need?

no

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests

@@ -422,7 +422,7 @@ func createHost(provider, name, region, zone, projectID, userData, inletsPort st
} else if provider == "gce" {
return &provision.BasicHost{
Name: name,
OS: "projects/debian-cloud/global/images/debian-9-stretch-v20191121",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect there was a good reason why we used Debian here, but Stretch is now out of support.

@utsavanand2 do you remember why? cc @maelvls Perhaps Debian was just so much quicker to boot up a VM?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexellis Yes, we tried out both Ubuntu and Stretch and at the time we built this, Stretch was marginally faster on the smallest f1-micro machine type. We might want to try out this minimal image and see how this works out projects/ubuntu-os-cloud/global/images/ubuntu-minimal-2004-focal-v20210707

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want, i can change to minimal and give it a spin again

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexellis or @utsavanand2, do you have any rough expected time for booting? So i can compare or should we just build on minimal and if it works its fine?

Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
@dirien
Copy link
Contributor Author

dirien commented Jul 9, 2021

wit the minimal ubuntu focal image:

go run main.go create -p gce --project-id=$PROJECTID -f=key.json

Using provider: gce
Requesting host: elegant-goldwasser1 in us-central1-a, from gce
2021/07/09 07:23:43 Creating firewall exists, updating: inlets
Host: elegant-goldwasser1|us-central1-a|central-element-274017, status: provisioning
[1/500] Host: elegant-goldwasser1|us-central1-a|central-element-274017, status: STAGING
[2/500] Host: elegant-goldwasser1|us-central1-a|central-element-274017, status: STAGING
[3/500] Host: elegant-goldwasser1|us-central1-a|central-element-274017, status: STAGING
[4/500] Host: elegant-goldwasser1|us-central1-a|central-element-274017, status: active
inlets PRO TCP (0.8.3) server summary:
  IP: 35.192.104.197
  Auth-token:

inlets-pro tcp client --url "wss://35.192.104.197:8123" \
  --token "rsYwL1OjqT5tNOOw12em6ixXoNooxk6z9AfrJXuRrlJyqmw5HHMFLjXJB9iMKKG1" \
  --upstream $UPSTREAM \
  --ports $PORTS
2021/07/09 07:24:54 Starting TCP client. Version 0.8.5 - 8db64ded51b1455cf4ad027c52bc9cfbeb55c4b3
2021/07/09 07:24:54 Licensed to: Free trial <contact@openfaas.com>, expires: 28 day(s)
2021/07/09 07:24:54 Upstream server: localhost, for ports: 8080
inlets-pro client. Copyright Alex Ellis, OpenFaaS Ltd 2020
INFO[2021/07/09 07:24:56] Connecting to proxy                           url="wss://35.192.104.197:8123/connect"
INFO[2021/07/09 07:24:56] Connection established.. OK.
 ~ curl 35.192.104.197:8080
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
    body {
        width: 35em;
        margin: 0 auto;
        font-family: Tahoma, Verdana, Arial, sans-serif;
    }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

@alexellis alexellis merged commit f0b3d64 into inlets:master Jul 9, 2021
@alexellis
Copy link
Member

Merging. That seems fast enough 👍

Thanks both

@dirien dirien deleted the gce branch July 9, 2021 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants