Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #35 from Pumtrix-Tech/ubuntu-22.04
Browse files Browse the repository at this point in the history
Updated repo to support ubuntu 22.04
  • Loading branch information
laf authored May 11, 2023
2 parents fdaa0b8 + 2bfc7c4 commit fc33d48
Show file tree
Hide file tree
Showing 19 changed files with 317 additions and 688 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

Clone the repository:

$ git clone https://github.com/librenms/packer-builds && cd packer-builds
```bash
git clone https://github.com/librenms/packer-builds && cd packer-builds
```

Install requirements:

Expand All @@ -21,15 +23,17 @@ You can configure each template to match your requirements by setting the follow
`headless` | 0 | [Documentation](https://packer.io/docs/builders/virtualbox-iso.html#headless)
`memory` | 512 | Memory size in MB
`mirror` | | A URL of the mirror where the ISO image is available
`librenms_version` | master | The version to build LibreNMS agains. You can use a branch name or tag
`librenms_version` | master | Available options are master or release, master will be up to the latest commit and release will be the latest tag
`oxidized` | true | Install Oxidized as part of the image
`syslog_ng` | true | Install and configure Syslog-NG

### Example

Build a LibreNMS CentOS 7 (NGINX) box with a 10GB hard disk using the VirtualBox provider:
Build a LibreNMS Ubuntu 22.04 (NGINX) box with a 10GB hard disk using the VirtualBox provider:

$ packer build -only=virtualbox-iso -var disk_size=10000 centos-7.6-x86_64.json
```bash
packer build -only=virtualbox-iso -var disk_size=10000 ubuntu-22.04-amd64.json
```

If running on a remote system over ssh, or on a system without a graphical
console, add `-var headless=true`
Expand Down
103 changes: 69 additions & 34 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,70 @@
Vagrant.configure('2') do |config|
7.times do
config.vm.network :private_network, type: :dhcp
end

Pathname.glob('*.json').sort.each do |template|
name = template.basename('.json').to_s
escaped_name = name.gsub(/[.]/, '_')

config.vm.define "#{escaped_name}-libvirt" do |c|
c.vm.box = name

c.vm.provider :libvirt do |v, override|
override.vm.synced_folder '', '/vagrant', disabled: true
end
end

config.vm.define "#{escaped_name}-virtualbox" do |c|
c.vm.box = name

c.vm.provider :virtualbox do |v|
v.name = name
v.gui = false
end
end

config.vm.define "#{escaped_name}-vmware_fusion" do |c|
c.vm.box = name

c.vm.provider :vmware_fusion do |v|
v.gui = false
end
end
end
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
config.vm.box = "librenms-test"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"

# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
# end
#
# View the documentation for the provider you are using for more
# information on available options.

# Enable provisioning with a shell script. Additional provisioners such as
# Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
# documentation for more information about their specific syntax and use.
# config.vm.provision "shell", inline: <<-SHELL
# apt-get update
# apt-get install -y apache2
# SHELL
end
157 changes: 0 additions & 157 deletions centos-7.6-x86_64.json.disabled

This file was deleted.

50 changes: 0 additions & 50 deletions http/centos-7.6/anaconda-ks.cfg

This file was deleted.

Empty file added http/ubuntu-22.04/meta-data
Empty file.
Loading

0 comments on commit fc33d48

Please sign in to comment.