Reddit DevOps
270 subscribers
5 photos
31K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Nothing special...

Hey guys,

This is not particularly a startup/ product, mostly just a project idea. But anyone interested in Simplifying cloud hosting for developers?

As a developer I see that hosting, devops and deployment of applications can be a real challenge nowadays. Especially for small quick prototypes. Building applications on cloud platforms like AWS or Azure can be a tedious and complex task, even for experienced cloud engineers who still make mistakes with load balancer rules, instance management, and more. The result is often inefficient or expensive solutions.

To tackle this problem, I want to create app blueprints that can be added to Python, Node, Rust, or Java apps. These blueprints will connect the app to your AWS, Azure, GCP, or VSphere accounts, and spin up a cloud infrastructure with all the best practices built in: along side storage, databases, key vaults etc that you need.

I plan on it being just prebuilt IaC modules through Pulumi or Terraform, I believe there is a strong market for this as many developers want to use IaC but honestly don't really care about being as descriptive and pedantic as it forces you to be. I honestly believe the benefits are two-fold: Firstly, we make the process of hosting an application much easier, quicker, and more efficient. Secondly, we help developers avoid common mistakes and improve their cloud infrastructure, making their apps more secure, reliable and optimized.

I also think this kind of project is a great candidate for open source

Let me know if this is interesting to anyone/ this already exists.

https://redd.it/10sv2py
@r_devops
Error with SSL certificate using private key and certificate from organization with SAN added

I've generated a private key and CSR using openssl, then submitted the CSR to my organization. I received the certificate and used it along with the private key generated by openssl. Despite adding SAN, I am still encountering an error saying

"This server could not prove that it is localapp; its security certificate does not specify Subject Alternative Names. This may be caused by a misconfiguration or an attacker intercepting your connection."

What am I doing wrong?

https://redd.it/10t81ro
@r_devops
Not able to complete Vagrant up, with custom.ssh.password in Vagrantfile

Hello guys, I'm new to Vagrant, trying to learn sorry if this question is too dumb. I'm using below vagrantfile. Rather than using default password "vagrant", I'm trying to use custom config.ssh.password. I tried few things, I'm able to figure out.

# vi: set ft=ruby :

Vagrant.configure("2") do |config|

# Define new vm called Master
config.vm.define "master" do |master|
master.vm.box = "bento/ubuntu-22.04"
master.vm.hostname= "controlplane"
master.ssh.username = 'test'
master.ssh.password = 'test'

## for private Network which would create a bridge to physical network
# master.vm.network "privatenetwork", ip: "192.168.56.111"

## for Public Network which would directly attach user to the physical network
master.vm.network "publicnetwork", type: "bridge", bridge: "wlp3s0", ip: "192.168.1.222"

master.vm.provider "virtualbox" do |provider|
provider.memory = 2048
provider.cpus = 1
end

end

end

Terminal_ouput :

==> master: Waiting for machine to boot. This may take a few minutes...
master: SSH address: 127.0.0.1:2222
master: SSH username: test
master: SSH auth method: password
[email protected]'s password:
[email protected]'s password:
master: Warning: Authentication failure. Retrying...
[email protected]'s password:

​

https://redd.it/10t866l
@r_devops
How is "branch deploy" useful?

https://github.blog/2023-02-02-enabling-branch-deployments-through-issueops-with-github-actions/

I don't get how this kind of deployment is better, as it means the state on production is not the state of main?
Example, I deploy a branch feat/awesome-button. I will see the awesome button in production. But if someone pull main, they won't see the button as the branch wasn't merged yet?

https://redd.it/10tamdl
@r_devops
Hiding a website/url's identity

Hey all,

I'm sorry if this isn't the right sub for this, but devops is the closest field I could think of that may answer my question.

I have a friend who's looking into starting website/blog of a "politically sensitive" nature. The guy's a journalist with a history of quite a few death threats over his liberal views, especially from religious sources. So you can understand that the guy's safety and anonymity are paramount. What would be the best practice for such an endeavor? Over-seas hosting? Where?

I'm helping him set it up so my understanding of the tech is mostly from the developer's pov.

Thank you!

https://redd.it/10td3m6
@r_devops
What webinar would you actually take the time to watch?

Hi there! I'm a course and webinar creator for DevOps. I'd love to get your feedback on the topics you really want to hear about in a 30-40 minute webinar. This is all thought leadership -no sales or marketing.
What would be helpful for you? Drop your ideas here, and thank you!

https://redd.it/10su2br
@r_devops
GitHub Actions for Continuous Integration



GitHub Actions for Continuous Integration

​

https://community.cisco.com/t5/devops-knowledge-articles/github-actions-for-continuous-integration/ta-p/4762097

​

The continuous integration (CI) pipeline which I’m about to share is worth sharing because it accomplishes two things in particular, which you may have assumed GitHub Actions would do out of the box, but for which I had to do some research to find and implement niche tools. These two things are:

1) Detect exactly which file(s) have changed in a Push to GitHub and assign the properties of those files to variables.

2) After running a script using those variables, automatically Commit and Push back into the GitHub repository.

The idea for this project came from our team’s desire to attach audio versions of the blogs and articles we post to the Cisco Community. This will enable those who are visually impaired and give everyone else the option to listen instead of reading. I also wanted to have a place to store all my blog and article documents, other than a folder on my desktop. This source of truth (SOT) of text templates and their associated audio MP3s will also serve as an archive for future use of this knowledge.

https://redd.it/10rsgif
@r_devops
How are you editing helm charts?

Hi there,

I'm currently using IntelliJ IDEA with the Kubernetes plugin to edit my helm charts.

It's nice, but it's not complete. I'm looking for a better way, to help me on periodic refactor and overcome some of the annoying YAML/Helm shenanigans and boilerplate.

I'm also thinking of offloading some of the helm chart parts (mainly around deployments) to developers. The developers mostly don't know helm and know very little k8s, and I'm looking for a way to make it easier for them. Know any editor/tool/helper that can help?

In general, I would love to know, in your company, are developers involved in editing helm charts? And if so, which parts mostly?

https://redd.it/10rq8d6
@r_devops
Freelancer site

Hi, what is is the best website to offer my services as DevOps SRE? Thanks!

https://redd.it/10rorxd
@r_devops
When you npm build and deploy what do you do with the build file after?

I did a npm build so I can I deploy on netlify. But it's in my folder project now. I shouldn't push it to my Github right? Should I just delete it and then everytime I update my project I make a new npm build?

https://redd.it/10ruitg
@r_devops
Fedora CoreOS in 2023?

When CoreOS was shutdown and rebranded to Fedora CoreOS with less and missing features the project was basically dead for me. Is anyone using the fedora version and can tell me how it is going? If not, which alternatives are you using as Docker Base OS? Thanks!

https://redd.it/10tk67a
@r_devops
How Much Time Over 40 Hours Per Week?

I'm curious how much you all work more than a stereotypical 40 hours per week? And I don't just mean hours on the job, I'm interested in how much time you invest in your career overall weekly? That could mean working more than 8 hours a day, or regularly spending time studying for certifications or working on an open source project to advance your career? Personally, I worked waaay more than 40, between working long hours and/or responding to on-call issues. I really have spent little time advancing my career (certs, etc) lately because I've worked so much. And I've really been surprised by hearing some say they work 40 hours - it seems crazy to me that what I do is just a 40 hour a week job somewhere else. And to think someone working just 40 hours might have a similar salary.

https://redd.it/10tkmys
@r_devops
Terraform Drift Detection

Hey r/devops!

​

I'm wondering if/how you do drift detection for Terraform?


This is a problem I've faced at multiple companies and none of the solutions seem all that great.


How do you get the results reported back to you?
Slack?
Email?
Some other way?
What do you do with them?
Auto remediate (i.e. run an apply)
Review some duration after and apply?
Ignore them?

https://redd.it/10tmm83
@r_devops
Failed to Build Custom Packer Ubuntu Cloud Image

Makefile:24: custom-cloudimg.tar.gz\] Error 1

[https://github.com/canonical/packer-maas/issues/93](https://github.com/canonical/packer-maas/issues/93)

From: serveradmin@maas:/packer-maas/ubuntu$

I ran: sudo make custom-cloudimg.tar.gz PACKER\_LOG=1

Output:

sudo rm -f -rf output-* custom-.gz
sudo packer init . && sudo PACKER_LOG=1 packer build -only='cloudimg.' .
2023/02/01 22:59:10 [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:10 [TRACE] discovering plugins in /usr/bin
2023/02/01 22:59:10 [TRACE] discovering plugins in /root/.config/packer/plugins
2023/02/01 22:59:10 [DEBUG] Discovered plugin: qemu = /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64
2023/02/01 22:59:10 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2023/02/01 22:59:10 [TRACE] discovering plugins in .
2023/02/01 22:59:10 [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:10 [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:10 [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:10 [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:10 [TRACE] listing potential installations for "github.com/hashicorp/qemu" that match "> 1.0". plugingetter.ListInstallationsOptions{FromFolders:[]string{"/usr/bin/packer", ".", "/root/.config/packer/plugins"}, BinaryInstallationOptions:plugingetter.BinaryInstallationOptions{APIVersionMajor:"5", APIVersionMinor:"0", OS:"linux", ARCH:"amd64", Ext:"", Checksummers:[]plugingetter.Checksummer{plugingetter.Checksummer{Type:"sha256", Hash:(*sha256.digest)(0xc000187100)}}}}
2023/02/01 22:59:10 [TRACE] Found the following "github.com/hashicorp/qemu" installations: [{/root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 v1.0.9}]
2023/02/01 22:59:10 [INFO] found external [-packer-default-plugin-name-] builders from qemu plugin
2023/02/01 22:59:10 [TRACE] validateValue: not active for https_proxy, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for ssh_password, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for filename, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for kernel, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for flat_filename, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for headless, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for customize_script, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for http_directory, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for http_proxy, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for ubuntu_series, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for architecture, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for no_proxy, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for ssh_username, so skipping
2023/02/01 22:59:10 [TRACE] validateValue: not active for ssh_ubuntu_password, so skipping
2023/02/01 22:59:10 [TRACE] Starting internal plugin packer-builder-null
2023/02/01 22:59:10 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-builder-null"}
2023/02/01 22:59:10 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-builder-null plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-builder-null plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-builder-null plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-builder-null plugin: [WARN] Config file doesn't exist:
/root/.packerconfig
2023/02/01 22:59:11 packer-builder-null plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-builder-null plugin: args: []string{"packer-builder-null"}
2023/02/01 22:59:11 packer-builder-null plugin: Plugin address: unix /tmp/packer-plugin730629675
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin730629675
2023/02/01 22:59:11 packer-builder-null plugin: Waiting for connection...
2023/02/01 22:59:11 packer-builder-null plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-shell-local
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell-local"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: args: []string{"packer-provisioner-shell-local"}
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin1446554703
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: Plugin address: unix /tmp/packer-plugin1446554703
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: Waiting for connection...
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting external plugin /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 start builder -packer-default-plugin-name-
2023/02/01 22:59:11 Starting plugin: /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 []string{"/root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64", "start", "builder", "-packer-default-plugin-name-"}
2023/02/01 22:59:11 Waiting for RPC address for: /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64
2023/02/01 22:59:11 Received unix RPC address for /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64: addr is /tmp/packer-plugin3244714285
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 Plugin address: unix /tmp/packer-plugin3244714285
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 Waiting for connection...
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 Serving a plugin connection...
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 [TRACE] starting builder -packer-default-plugin-name-
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 use detected accelerator: tcg
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-shell
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-shell
plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/02/01 22:59:11 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin1626014604
2023/02/01 22:59:11 packer-provisioner-shell plugin: Waiting for connection...
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin1626014604
2023/02/01 22:59:11 packer-provisioner-shell plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-shell
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/02/01 22:59:11 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin877673212
2023/02/01 22:59:11 packer-provisioner-shell plugin: Waiting for connection...
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin877673212
2023/02/01 22:59:11 packer-provisioner-shell plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-shell
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin463586335
2023/02/01 22:59:11 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin463586335
2023/02/01 22:59:11 packer-provisioner-shell plugin: Waiting for connection...
2023/02/01 22:59:11 packer-provisioner-shell plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-file
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-file"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-file plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-file plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-file plugin:
[INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-file plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-file plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-file plugin: args: []string{"packer-provisioner-file"}
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin1710102504
2023/02/01 22:59:11 packer-provisioner-file plugin: Plugin address: unix /tmp/packer-plugin1710102504
2023/02/01 22:59:11 packer-provisioner-file plugin: Waiting for connection...
2023/02/01 22:59:11 packer-provisioner-file plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-shell
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin2959182279
2023/02/01 22:59:11 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin2959182279
2023/02/01 22:59:11 packer-provisioner-shell plugin: Waiting for connection...
2023/02/01 22:59:11 packer-provisioner-shell plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-provisioner-shell
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-provisioner-shell"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-provisioner-shell plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin1234524249
2023/02/01 22:59:11 packer-provisioner-shell plugin: Plugin address: unix /tmp/packer-plugin1234524249
2023/02/01 22:59:11 packer-provisioner-shell plugin: Waiting for connection...
2023/02/01 22:59:11 packer-provisioner-shell plugin: Serving a plugin connection...
2023/02/01 22:59:11 [TRACE] Starting internal plugin packer-post-processor-shell-local
2023/02/01 22:59:11 Starting plugin: /usr/bin/packer []string{"/usr/bin/packer", "plugin", "packer-post-processor-shell-local"}
2023/02/01 22:59:11 Waiting for RPC address for: /usr/bin/packer
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: [INFO] Packer version: 1.8.5 [go1.18.9 linux amd64]
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: [INFO] PACKER_CONFIG env var not set; checking the default config file path
2023/02/01 22:59:11
packer-post-processor-shell-local plugin: [INFO] PACKER_CONFIG env var set; attempting to open config file: /root/.packerconfig
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: [WARN] Config file doesn't exist: /root/.packerconfig
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: [INFO] Setting cache directory: /root/.cache/packer
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: args: []string{"packer-post-processor-shell-local"}
2023/02/01 22:59:11 Received unix RPC address for /usr/bin/packer: addr is /tmp/packer-plugin1063530221
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: Plugin address: unix /tmp/packer-plugin1063530221
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: Waiting for connection...
2023/02/01 22:59:11 packer-post-processor-shell-local plugin: Serving a plugin connection...
2023/02/01 22:59:11 Build debug mode: false
cloudimg.deps.null.dependencies: output will be in this color.
2023/02/01 22:59:11 Force build: false
cloudimg.image.qemu.cloudimg: output will be in this color.

2023/02/01 22:59:11 On error:
2023/02/01 22:59:11 Waiting on builds to complete...
2023/02/01 22:59:11 Starting build run: cloudimg.image.qemu.cloudimg
2023/02/01 22:59:11 Running builder:
2023/02/01 22:59:11 [INFO] (telemetry) Starting builder qemu.cloudimg
2023/02/01 22:59:11 Starting build run: cloudimg.deps.null.dependencies
2023/02/01 22:59:11 Running builder:
2023/02/01 22:59:11 [INFO] (telemetry) Starting builder null.dependencies
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 Qemu path: /usr/bin/qemu-system-x86_64, Qemu Image path: /usr/bin/qemu-img
2023/02/01 22:59:11 packer-builder-null plugin: [INFO] communicator disabled, will not connect
2023/02/01 22:59:11 packer-builder-null plugin: Unable to load communicator config from state to populate provisionHookData
2023/02/01 22:59:11 packer-builder-null plugin: Running the provision hook
==> cloudimg.image.qemu.cloudimg: Retrieving ISO
2023/02/01 22:59:11 [INFO] (telemetry) Starting provisioner shell-local
==> cloudimg.image.qemu.cloudimg: Trying https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
2023/02/01 22:59:11 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:11 Acquiring lock for: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img?checksum=sha256%3A71657529fc067dbda2537762730904a68905ae1202a30ec00a645828506939df (/root/.cache/packer/4ac13ea39617f95e49eb6b13917c0e6ff190f0d5.iso.lock)
==> cloudimg.image.qemu.cloudimg: Trying https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img?checksum=sha256%3A71657529fc067dbda2537762730904a68905ae1202a30ec00a645828506939df
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] (shell-local): Prepending inline script with #!/bin/bash -e
==> cloudimg.deps.null.dependencies: Running local shell script: /tmp/packer-shell2978727124
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] (shell-local): starting local command: /bin/sh -c PACKER_BUILDER_TYPE='null' PACKER_BUILD_NAME='dependencies' /tmp/packer-shell2978727124
2023/02/01 22:59:11 packer-provisioner-shell-local plugin: [INFO] (shell-local communicator): Executing local shell command [/bin/sh -c PACKER_BUILDER_TYPE='null' PACKER_BUILD_NAME='dependencies' /tmp/packer-shell2978727124]
==> cloudimg.deps.null.dependencies: /tmp/packer-shell2978727124: line 3: cloud-localds: command not found
2023/02/01 22:59:11 [INFO] (telemetry) ending shell-local
2023/02/01 22:59:11 packer-builder-null plugin: Unable to load communicator config from state to populate provisionHookData
==> cloudimg.deps.null.dependencies: Provisioning step had errors: Running the cleanup provisioner, if present...
2023/02/01 22:59:11 [INFO] (telemetry) ending null.dependencies
Build 'cloudimg.deps.null.dependencies' errored after 21
milliseconds 779 microseconds: Script exited with non-zero exit status: 127. Allowed exit codes are: [0]
==> cloudimg.image.qemu.cloudimg: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img?checksum=sha256%3A71657529fc067dbda2537762730904a68905ae1202a30ec00a645828506939df => /root/.cache/packer/4ac13ea39617f95e49eb6b13917c0e6ff190f0d5.iso
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Leaving retrieve loop for ISO
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 No floppy files specified. Floppy disk will not be made.
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 No CD files specified. CD disk will not be made.
==> cloudimg.image.qemu.cloudimg: Creating required virtual machine disks
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 [INFO] Creating disk with Path: output-cloudimg/packer-cloudimg and Size: 4G
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Executing qemu-img: []string{"create", "-f", "qcow2", "-b", "/root/.cache/packer/4ac13ea39617f95e49eb6b13917c0e6ff190f0d5.iso", "-F", "qcow2", "-F", "qcow2", "output-cloudimg/packer-cloudimg", "4G"}
==> cloudimg.image.qemu.cloudimg: Resizing hard drive...
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 stdout: Formatting 'output-cloudimg/packer-cloudimg', fmt=qcow2 size=4294967296 backing_file=/root/.cache/packer/4ac13ea39617f95e49eb6b13917c0e6ff190f0d5.iso backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 stderr:
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Executing qemu-img: []string{"resize", "-f", "qcow2", "output-cloudimg/packer-cloudimg", "4G"}
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 stdout: Image resized.
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 stderr:
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Found available port: 8063 on IP: 0.0.0.0
==> cloudimg.image.qemu.cloudimg: Starting HTTP server on port 8063
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Looking for available communicator (SSH, WinRM, etc) port between 2222 and 4444
==> cloudimg.image.qemu.cloudimg: Found port for communicator (SSH, WinRM, etc): 3695.
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Found available port: 3695 on IP: 127.0.0.1
==> cloudimg.image.qemu.cloudimg: Looking for available port between 5900 and 6000 on 127.0.0.1
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Looking for available port between 5900 and 6000 on 127.0.0.1
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Found available port: 5945 on IP: 127.0.0.1
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Found available VNC port: 5945 on IP: 127.0.0.1
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Qemu --version output: QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.24)
==> cloudimg.image.qemu.cloudimg: Starting VM, booting disk image
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Qemu version: 4.2.1
cloudimg.image.qemu.cloudimg: view the screen of the VM, connect via VNC without a password to
cloudimg.image.qemu.cloudimg: vnc://127.0.0.1:5945
cloudimg.image.qemu.cloudimg: The VM will
be run headless, without a GUI. If you want to
cloudimg.image.qemu.cloudimg: view the screen of the VM, connect via VNC without a password to
cloudimg.image.qemu.cloudimg: vnc://127.0.0.1:5945
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Qemu Builder has no floppy files, not attaching a floppy.
==> cloudimg.image.qemu.cloudimg: Overriding default Qemu arguments with qemuargs template option...
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Executing /usr/bin/qemu-system-x86_64: []string{"-cpu", "host", "-device", "virtio-gpu-pci", "-device", "virtio-net,netdev=user.0", "-drive", "if=pflash,format=raw,id=ovmf_code,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd", "-drive", "if=pflash,format=raw,id=ovmf_vars,file=OVMF_VARS.fd", "-drive", "file=output-cloudimg/packer-cloudimg,format=qcow2", "-drive", "file=seeds-cloudimg.iso,format=raw", "-boot", "c", "-vnc", "127.0.0.1:45", "-machine", "ubuntu,accel=kvm", "-name", "packer-cloudimg", "-netdev", "user,id=user.0,hostfwd=tcp::3695-:22", "-m", "2048M", "-smp", "2"}
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Started Qemu. Pid: 31645
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 Qemu stderr: qemu-system-x86_64: -drive file=seeds-cloudimg.iso,format=raw: Could not open 'seeds-cloudimg.iso': No such file or directory
==> cloudimg.image.qemu.cloudimg: Error launching VM: Qemu failed to start. Please run with PACKER_LOG=1 to get more info.
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 failed to unlock port lockfile: close tcp 127.0.0.1:5945: use of closed network connection
2023/02/01 22:59:15 packer-plugin-qemu_v1.0.9_x5.0_linux_amd64 plugin: 2023/02/01 22:59:15 failed to unlock port lockfile: close tcp 127.0.0.1:3695: use of closed network connection
==> cloudimg.image.qemu.cloudimg: Deleting output directory...
Build 'cloudimg.image.qemu.cloudimg' errored after 3 seconds 340 milliseconds: Build was halted.

==> Wait completed after 3 seconds 340 milliseconds

==> Some builds didn't complete successfully and had errors:
--> cloudimg.deps.null.dependencies: Script exited with non-zero exit status: 127. Allowed exit codes are: [0]
--> cloudimg.image.qemu.cloudimg: Build was halted.

==> Builds finished but no artifacts were created.
2023/02/01 22:59:15 [INFO] (telemetry) ending qemu.cloudimg
==> Wait completed after 3 seconds 340 milliseconds
2023/02/01 22:59:15 machine readable: error-count []string{"2"}
==> Some builds didn't complete successfully and had errors:
2023/02/01 22:59:15 machine readable: cloudimg.deps.null.dependencies,error []string{"Script exited with non-zero exit status: 127. Allowed exit codes are: [0]"}
2023/02/01 22:59:15 machine readable: cloudimg.image.qemu.cloudimg,error []string{"Build was halted."}
==> Builds finished but no artifacts were created.
2023/02/01 22:59:15 [INFO] (telemetry) Finalizing.
2023/02/01 22:59:15 waiting for all plugin processes to complete...
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /root/.config/packer/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.9_x5.0_linux_amd64: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
2023/02/01 22:59:15 /usr/bin/packer: plugin process exited
make: *** [Makefile:24: custom-cloudimg.tar.gz] Error 1
serveradmin@maas:/packer-maas/ubuntu$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
serveradmin@maas:/packer-maas/ubuntu$ ls
Makefile packages ubuntu-lvm.pkr.hcl
OVMF_VARS.fd scripts user-data-cloudimg
README.md ubuntu-cloudimg.pkr.hcl user-data-flat
http ubuntu-cloudimg.variables.pkr.hcl user-data-lvm
meta-data ubuntu-flat.pkr.hcl variables.pkr.hcl

https://redd.it/10raipa
@r_devops