BSD 3-Clause "New" or "Revised" License

项目介绍

uyuni-project/sumaform 是一个托管在 GitHub 上的开源项目,主要使用 HCL 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前获得 79 个 Star、80 次 Fork。

仓库全名
uyuni-project/sumaform
开源许可证
BSD 3-Clause "New" or "Revised" License
Star 数
79
Fork 数
80
未关闭 Issue
60

README 摘要

sumaform is a way to quickly configure test Uyuni and SUSE Multi-Linux Manager infrastructures with clients and servers. Installation OpenTofu version: 1.10.7 (preferred) || Terraform version: >= 1.6.0 Libvirt provider version: 0.8.3 NOTE: to deploy development versions of SUSE Multi-Linux Manager you will have to have SUSE's internal CA certificates installed on your system. You will need to edit HCL (HashiCorp…

完整内容见 GitHub 原始 README 或本页 。

常见问题

sumaform 用什么语言开发?

主要使用 HCL 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前有 79 个 Star。

sumaform 可以免费商用吗?

仓库采用 BSD 3-Clause "New" or "Revised" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 sumaform 的源码?

可以直接克隆仓库:git clone https://github.com/uyuni-project/sumaform.git,默认分支为 master;安装与运行步骤见仓库 README。

sumaform 最近还在维护吗?

仓库最近一次更新为 5 天前,当前有 60 个未关闭 Issue;Star 数为 79,可作为社区活跃度的参考。

关于

OpenTofu configuration to quickly set up SUSE Multi-Linux Manager/Uyuni environments

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
263
价值分
70
活跃状态
活跃

语言占比

Dockerfile
Groovy
HCL
Python
Ruby
Salt
Scheme
Shell
XSLT

README

sumaform logo

sumaform is a way to quickly configure test Uyuni and SUSE Multi-Linux Manager infrastructures with clients and servers.

CI validation tests Join the chat at https://gitter.im/sumaform/Lobby

Installation

OpenTofu version: 1.10.7 (preferred) || Terraform version: >= 1.6.0

Libvirt provider version: 0.8.3

NOTE: to deploy development versions of SUSE Multi-Linux Manager you will have to have SUSE’s internal CA certificates installed on your system.

You will need to edit HCL (HashiCorp Configuration Language) files. Syntax highlighting is available in major text editors like atom.

Prerequisites for openSUSE and SUSE Linux Enterprise Server

Execute the following on openSUSE and SUSE Linux Enterprise Server:

# Uncomment one of the following lines depending on your distro

# openSUSE Tumbleweed
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/openSUSE_Tumbleweed/
# openSUSE Leap 16
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/16.0/
# SUSE Linux Enterprise Server (SLES)
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP5/
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP6/
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP7/
sudo zypper install git-core
sudo zypper install --from systemsmanagement_sumaform opentofu terraform-provider-libvirt
git clone https://github.com/uyuni-project/sumaform.git

Prerequisites for Ubuntu and Debian

Execute the following commands:

sudo apt install alien
wget http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP7/x86_64/opentofu.rpm
sudo alien -i opentofu.rpm
wget http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP7/x86_64/terraform-provider-libvirt.rpm
sudo alien -i terraform-provider-libvirt.rpm
git clone https://github.com/uyuni-project/sumaform.git

Backend choice

Backends explained

sumaform can deploy virtual machines to:

  • single libvirt hosts
  • z/VM hosts
  • Amazon Web Services
  • Microsoft Azure
  • null backend

The simplest, recommended setup is to use libvirt on your local host. That needs at least 8 GB of RAM in your machine. If you need a lot of VMs or lack hardware you probably want to use an external libvirt host with bridged networking.

The Amazon Web Services and Microsoft Azure backends are currently under maintenance and are not immediately usable as-is. We plan to restore them.

The null backend can be useful in a wide variety of scenarios, for example:

  • Test configurations before going live in another supported backend
  • Cases in which the virtual infrastructure is outside of the OpenTofu user’s control
  • Cover architectures that will maybe never be covered by any other OpenTofu plugin

See TROUBLESHOOTING.md for more information about configuring the backend. Each backend has a README file with further configuration instructions.

To choose the backend in use one should create a symbolic link to a backend_module module.

ln -s ../backend_modules/<BACKEND>/ modules/backend

Preparing for the libvirt backend

To use the libvirt provider, install and enable libvirt before you attempt to run the OpenTofu deployment. The virt-manager package is recommended because it configures default resources that the OpenTofu deployment uses, e.g. the default virtual network.

# Download and install libvirt and virt-manager, for example:
sudo zypper install libvirt virt-manager
# On Ubuntu/Debian:
sudo apt install virt-manager qemu-kvm libvirt-daemon-system

# Start libvirt
sudo systemctl start libvirtd

# Optionally, enable libvirt so that it starts at boot time
sudo systemctl enable libvirtd

Create a symbolic link to the libvirt backend module:

ln -s ../backend_modules/libvirt/ modules/backend

Copy the libvirt example file and adjust it:

cp main.tf.libvirt.example main.tf

Basic main.tf configuration

In sumaform you define a set of virtual machines in a main.tf configuration file, then run OpenTofu to have them deployed. Contents of the file vary slightly depending on the backend you choose.

Refer to the backend-specific READMEs to get started:

Typical use

Refer to the official guides for a general understanding of OpenTofu and full commands.

For a very quick start:

vim main.tf     # change your VM setup
tofu init  # populate modules
tofu validate # check if the configuration is valid
tofu apply # prepare and apply a plan to create your systems (after manual confirmation)

Common Variables

cc_username/cc_password: Credentials for the SUSE Customer Center. Set these credentials if you are deploying SUMA, or synchronizing SUMA repositories. They can be omitted when deploying Uyuni.

images: In the base module, the images variable specifies the images that you want to download and use in your installation, for example:

# main.tf file contents
module "base" {
  source = "./modules/base"

  images = [
    "almalinux8o",
    "almalinux9o",
    "almalinux10o",
    "amazonlinux2023o",
    "centos7o",
    "debian13o",
    "libertylinux9o",
    "libertylinux10o",
    "openeuler2403o",
    "opensuse160o",
    "opensuse161armo",
    "opensuse161ppco",
    "oraclelinux8o",
    "oraclelinux9o",
    "oraclelinux10o",
    "raspios13o",
    "rocky8o",
    "rocky9o",
    "rocky10o",
    "sles12sp5o",
    "sles15sp4o",
    "sles15sp5o",
    "sles15sp6o",
    "sles15sp7o",
    "sles160o",
    "slemicro53-ign",
    "slemicro54-ign",
    "slemicro55o",
    "slmicro60o",
    "slmicro61o",
    "slmicro62o",
    "tumbleweedo",
    "ubuntu2204o",
    "ubuntu2404o",
    "ubuntu2604o"
  ]
# ...
}

Accessing the Virtual Machines

Default Admin User

All systems deployed with the minimal Salt configuration include a default system administrator account for easier management and troubleshooting.

  • Username: admin
  • Password: spacewalk
  • Shell: /bin/bash
  • Privileges: Member of the admin group.

You can use these credentials to log in via the serial console or SSH (if password authentication is enabled) to perform initial setup tasks.

Advanced use

I have a problem!

Check TROUBLESHOOTING.md first, if that does not help feel free to join the Gitter chat!

评论

暂无评论