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

apt install terraform @ sid #31816

Open
stappersg opened this issue Sep 19, 2022 · 7 comments
Open

apt install terraform @ sid #31816

stappersg opened this issue Sep 19, 2022 · 7 comments
Labels
documentation enhancement new new issue not yet triaged

Comments

@stappersg
Copy link

Terraform Version

not applicable

Use Cases

Wishing to use terraform.

Attempted Solutions

Several retries of what is documented at https://www.terraform.io/downloads

But got today every time

  ...    
Ign:3 https://apt.releases.hashicorp.com sid InRelease
Err:4 https://apt.releases.hashicorp.com sid Release
  404  Not Found [IP: 18.65.39.12 443]
Reading package lists... Done
E: The repository 'https://apt.releases.hashicorp.com sid Release' does not have a Release file.
  ...

Digging deeper revealed this

$ curl --verbose --silent https://apt.releases.hashicorp.com/dists/sid/main/binary-amd64/Packages.xz | xmllint --format -
*   Trying 18.65.39.73:443...
* Connected to apt.releases.hashicorp.com (18.65.39.73) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
       ... several TLS   related lines ...
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=apt.releases.hashicorp.com
*  start date: Apr 27 00:00:00 2022 GMT
*  expire date: May 26 23:59:59 2023 GMT
*  subjectAltName: host "apt.releases.hashicorp.com" matched cert's "apt.releases.hashicorp.com"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
       ... more TLS   related lines ...
> GET /dists/sid/main/binary-amd64/Packages.xz HTTP/2
> Host: apt.releases.hashicorp.com
> user-agent: curl/7.84.0
> accept: */*
> 
< HTTP/2 404 
< content-type: application/xml
< date: Mon, 19 Sep 2022 16:17:32 GMT
< server: AmazonS3
< x-cache: Error from cloudfront
< via: 1.1 34833e1e6b760bb81603c4fa1e0bb5d6.cloudfront.net (CloudFront)
< x-amz-cf-pop: AMS1-P1
< x-amz-cf-id: -wTLD1QPe-TBBLOmti48pEGbBjXkMTv8dMYH_oGNvcqjWFS9pG0ATA==
< 
* Connection #0 to host apt.releases.hashicorp.com left intact
<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <Key>dists/sid/main/binary-amd64/Packages.xz</Key>
  <RequestId>EYT3XQNJWR3Y16MK</RequestId>
  <HostId>y7A/NHFeXiNaEH1g3dwIF7JwWro7NzPHtQFuMhzMPzTOPXe0BVXiQDhszyYQUr0qImZuIHNGU6A=</HostId>
</Error>
$

Proposal

Probably restoring the CI build street ...

References

No response

@stappersg stappersg added enhancement new new issue not yet triaged labels Sep 19, 2022
@crw
Copy link
Collaborator

crw commented Sep 19, 2022

Hi, it looks like you are using the unstable branch of Debian. Currently we build for the following Debian distros: Jessie, Stretch, Buster, Bullseye, Bookworm.

I would imagine if you looked into mixing stable and unstable apt repositories, you would find a way to install Terraform on an unstable distribution of Debian. Probably you need to change: sid to bullseye or bookworm in /etc/apt/sources.list.d/hashicorp.list, but I have not tested this myself.

@crw crw added the waiting-response An issue/pull request is waiting for a response from the community label Sep 19, 2022
@stappersg
Copy link
Author

Hi, it looks like you are using the unstable branch of Debian.

Yes.

$ lsb_release -cs
sid
$

Currently we build for the following Debian distros: Jessie, Stretch, Buster, Bullseye, Bookworm.

So I tried bookworm

$ curl  --silent https://apt.releases.hashicorp.com/dists/bookworm/main/binary-amd64/Packages.xz \
| xmllint --format -
<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <Key>dists/bookworm/main/binary-amd64/Packages.xz</Key>
  <RequestId>EJ95PSAJ16Y6AES8</RequestId>
  <HostId>mb2G8XlG1y/H3PV7lBGmYyTxrS0ek4GAZsQPXLJAZkZ7jMXEo0//2+W1zXMCYKb/9Wwg38tFv+8=</HostId>
</Error>
$ 

... mixing stable and unstable apt repositories, you would find a way to install Terraform on an unstable distribution of Debian.

I just want to use terraform, I compiled it from source, documented it
at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808940#105
With that self build executable do I have a working docker tutorial.

Thing that I learnt from this issue so far, is that the instructions

wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform

from https://www.terraform.io/downloads don't deal with the $(lsb_release -cs) getting expanded into sid.

Should I retitle the issue into apt install terraform @ sid?

@jbardin
Copy link
Member

jbardin commented Sep 20, 2022

Hi @stappersg,

In the meantime you could install Terraform manually. The CLI only consists of a single binary, and the most common installation method is to download that binary directly from releases.hashicorp.com/terraform.

@crw
Copy link
Collaborator

crw commented Sep 20, 2022

Should I retitle the issue into apt install terraform @ sid?

That makes sense. One outcome from this issue is that the release engineering team plans to update this page (https://www.hashicorp.com/official-packaging-guide) with the list of supported distributions.

To set expectations, I do not imagine we will decide to support sid/unstable in the near future. The workarounds are fairly straight-forward and it does not make sense for us to officially support the product on an unstable linux distribution.

Thanks for this report! We appreciate your help making the product and documentation better!

@stappersg stappersg changed the title apt install terraform apt install terraform @ sid Sep 20, 2022
@stappersg
Copy link
Author

Should I retitle the issue into apt install terraform @ sid?

That makes sense.

Done.

@apparentlymart
Copy link
Member

In the meantime we do have some Terraform-specific documentation about APT repositories which lists which distributions we support.

I'm noticing though that the page is no longer linked from anywhere useful. It was formally linked from our downloads page but that link got lost in the redesign of the download page which removed the side navigation bar in favor of the more-compact package manager selection tabs.


We should probably discuss this more in a separate issue but I'm going to note it here for now and then if we end up closing this issue before we've fully dealt with the surrounding context then we can fork this part off into a separate issue:

  • If we intend for the "Official Packaging Guide" page to be the source of truth for which distributions are supported then I think we should add a link to the downloads page from each of the relevant instruction tabs, and we should delete the Terraform-specific version of the docs which are then redundant with that official guide.
  • Alternatively, we could reinstate our Terraform-specific page as the source of truth and link to it from the Downloads page. However, that would involve figuring out how to coordinate updating that list whenever the release engineering team changes the set of supported disributions. (We also have a separate page about Yum/DNF/RPM packages which we'd presumably link from the "CentOS/RHEL", "Fedora", and "Amazon Linux" tabs on the downloads page, whereas the "Official Packaging Guide" has all of the repositories together on a single page)
  • Over in HashiCorp APT repository does not include packages for Ubuntu 22.04 LTS ("jammy") #31826 we can see that there's also a tutorial on learn.hashicorp.com which seems to duplicate the content on the current Official Packaging Guide page with additional detail and guidance. It also doesn't mention which distributions each of the repositories support. Perhaps this tutorial should subsume the content from our Terraform-specific documentation page and become the source of truth for which distributions we support, thereby replacing both the "Official Packaging Guide" and the Terraform-specific page about APT packages.

Details aside, it seems like our documentation is a bit messy here and there isn't a single place that contains all of the relevant information. I'm sure there are other ways we could tidy this up beyond the three I've suggested above.

@crw crw added documentation and removed waiting-response An issue/pull request is waiting for a response from the community labels Sep 22, 2022
@crw
Copy link
Collaborator

crw commented Sep 22, 2022

Notes for the docs team: I flagged this issue due to the docs concerns, but we should probably open a new issue for any docs changes we choose to make, and remove the docs label from this one once we've decided what to do next. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

4 participants