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

feat: Add Debian 11 machine image #195

Merged
merged 17 commits into from
Aug 19, 2022

Conversation

evilaliv3
Copy link
Contributor

@evilaliv3 evilaliv3 commented Apr 11, 2022

Note

PR template updated by @tenthirtyam.

Summary of Pull Request

With this pull request, I would like to propose the addition of a Debian 11 machine. The code produced starts from the scripts already loaded in the repository for Ubuntu and preserves the same exact configuration.

Type of Pull Request

  • This is a bugfix.
  • This is an enhancement or feature.
  • This is a code style / formatting update.
  • This is a documentation update.
  • This is a refactoring update.
  • This is something else.
    Please describe:

Closes #194

Test and Documentation Coverage

  • Tests have been completed (for bugfixes / features). (by @tenthirtyam)
  • Documentation has been added / updated (for bug fixes / features).

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

Note

Added by @tenthirtyam.

Current Gaps:

  • Boot from CD-based kickstart vs HTTPS when the data source is toggled to disk

@tenthirtyam tenthirtyam changed the title Add Debian/Linux 11 machine image feat: Add Debian/Linux 11 machine image Apr 11, 2022
@tenthirtyam tenthirtyam self-assigned this Apr 11, 2022
@evilaliv3 evilaliv3 force-pushed the image/debian-11 branch 2 times, most recently from 1f21b48 to d7aedae Compare April 11, 2022 20:14
@tenthirtyam tenthirtyam marked this pull request as draft April 12, 2022 01:29
@tenthirtyam tenthirtyam changed the title feat: Add Debian/Linux 11 machine image feat: Add Debian 11 machine image Apr 12, 2022
@evilaliv3
Copy link
Contributor Author

@tenthirtyam : i've improved my pull request aligning all the configurations and files where Debian should be listed.

I've not manually edited the build.sh script manually but instead edited the build.yml template so that you will be able just to re-generate the build.s script when you will eventually integrate the pull request.

Thank you

@tenthirtyam
Copy link
Collaborator

Thanks, @evilaliv3! 🚀

Have you reviewed the Ansible roles to see if any changes are needed specifically for Debian or reuse between Debian and Ubuntu?

Ryan Johnson
Staff II Solutions Architect | VMware, Inc.

@evilaliv3
Copy link
Contributor Author

evilaliv3 commented Apr 12, 2022

You are welcome @tenthirtyam

At the moment not as i'm new to ansible in general an learning it now through this valid set of examples.

As a feedback as user of your scripts and examples in my opinion your set of examples are such a great resource but too way much complete; i would probably avoid to include such reach set of ansible playbook but just guide and instruct users with few examples.

In my scenario for example I'm looking at this repo to automate the preparation of few virtual machines templates and to use this repository i need to forkit it because in your examples you install many tools like git, curl, and bash-completion that are not needed in our production systems but in this way we wont be able to easily pull back your updates.

I would like instead to have an easy scaffolding that i could use directly being able to fetch the upstream updates.

@tenthirtyam tenthirtyam self-requested a review April 12, 2022 23:10
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

No immediate concerns after reviewing the changes - follows the project de facto standards. I'll review the Ansible portions soon and aim to skip this into the next release.

Ryan Johnson
Staff II Solutions Architect | VMware, Inc.

builds/linux/debian/11/linux-debian.pkr.hcl Outdated Show resolved Hide resolved
@tenthirtyam tenthirtyam marked this pull request as ready for review April 12, 2022 23:45
Ryan Johnson and others added 5 commits April 12, 2022 19:47
Generated from `build.yaml`.
Sets the interpreter to `ANSIBLE_PYTHON_INTERPRETER=/usr/bin/python3` in the Ansible provisioner.
Adds the `python3-apt` package needed for the Ansible provisioner.
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

The locals for the data_source_command will need to be added and tested.

Example:

locals {
  #....
  data_source_command = var.common_data_source == "http" ? "url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" : "file=cdrom:/ks.cfg"
}

@tenthirtyam tenthirtyam added priority/medium Priority Medium and removed priority/low Low Priority labels Jul 12, 2022
@tenthirtyam
Copy link
Collaborator

Note

Guest OS identifier will need to be updated due to KB 85845.

@tenthirtyam
Copy link
Collaborator

tenthirtyam commented Jul 13, 2022

Guest automatically resets from other4xLinux64Guest to debian11_64Guest during clone operation from the content library and fails customization with the following.

Customization of the guest operating system is not supported due to the given reason: 
The guest OS 'Debian GNU/Linux 11 (64-bit)' installed in the VM is not supported for customization. 
Refer to vCenter documentation for supported configurations: 
http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf

Opening up an internal issue to review and resolve this issue before committing this feature as it needs to support both traditional template and OVF template in the content library.

In the meantime, I'll work on addressing the gaps for Ansible and the CD-based kickstart while this is tracked internally.

Label: status/track-internal under BZ-3003889.

Ryan Johnson
Staff II Solutions Architect | VMware, Inc.

@tenthirtyam
Copy link
Collaborator

For now, moving from v22.07 milestone to the Backlog as the cloning issue needs to be resolved for Debian 11-based OVF templates.

Ryan Johnson
Staff II Solutions Architect | VMware, Inc.

@evilaliv3
Copy link
Contributor Author

Thank you @tenthirtyam for the update.

Which are the current issues that you would like to fix?

@tenthirtyam
Copy link
Collaborator

Hey @evilaliv3 - the outstanding items include:

  • the Ansible playbook updates - simple, will address that.
  • update the disk-based data source option for kickstart to use the methods mentions earlier in the thread, but retain the http-based option by default.
  • there's an open internal engineering issue for VM clone of Debian 11 for guest customization. OS needs to be set to other4xLinux64Guest by default per KB, but when cloned from content library it automatically changes it to Debian 11 and customizations fail. I filed and am tracking a fix internal for a vCenter Server update.

Ryan Johnson
Staff II Solutions Architect | VMware, Inc.

Sets to OS to `other4xLinux64Guest`
@tenthirtyam tenthirtyam modified the milestones: Backlog, v22.08 Jul 27, 2022
Add perl to package configuration.

Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
@tenthirtyam
Copy link
Collaborator

  1. Regarding:

*...there's an open internal engineering issue for VM clone of Debian 11 for guest customization. OS needs to be set to other4xLinux64Guest by default per KB, but when cloned from content library it automatically changes it to Debian 11 and customizations fail. I filed and am tracking a fix internal for a vCenter Server update."

I have a fix for this issue that will be addressed in the Ansible playbook.

TL;DR:

/etc/open-vm-tools/tools.conf

[guestosinfo]
short-name = other4xLinux64Guest
  1. Regarding:

"...update the disk-based data source option for kickstart to use the methods mentions earlier in the thread, but retain the http-based option by default."

This will be HTTP-only for the first inclusion, much like SLES 15. We can add the disk method later.

Ryan Johnson
Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

Ryan Johnson added 3 commits August 18, 2022 20:56
Update to current structure.

Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
Update to current structure.

Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

I've resolved all conflicts and have brought the configurations up-to-date to the current structure. After merge into main, I'll merge in the changes for the Ansible playbooks which are already ready.

Ryan Johnson
Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

@tenthirtyam tenthirtyam marked this pull request as ready for review August 19, 2022 01:27
@tenthirtyam tenthirtyam merged commit 218cfc0 into vmware-samples:main Aug 19, 2022
@tenthirtyam
Copy link
Collaborator

Merged! 🚀

Ryan Johnson
Senior Staff Solutions Architect | Product Engineering @ VMware, Inc.

tenthirtyam pushed a commit that referenced this pull request Aug 19, 2022
Updates `CHANGELOG.md` to include the feature provided in #195 and #245.

Signed-off-by: Ryan Johnson <johnsonryan@vmware.com>
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for a Debian 11 machine image
3 participants