Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
Added several package versions and a yum repo file
Browse files Browse the repository at this point in the history
  • Loading branch information
dhollinger committed Mar 26, 2020
1 parent 2987afb commit e700f2e
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 15 deletions.
47 changes: 34 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,31 @@ Please see the pre-2.x [documentation](docs/LEGACY.md) if using the old gem-base

### Modern puppet_webhook (>= 2.x)

#### Generic

This assumes you already have the correct Ruby version installed in the system or via a tool like `rbenv`, `rvm`, or `asdf`.
#### Ubuntu/Debian

1. Download the latest release from the [Releases](https://github.com/voxpupuli/puppet_webhook/releases) page.
2. Extract the tarball into the desired directory:
Add the Voxpupuli GPG key and repository:
```bash
$ tar -xzvf puppet_webhook-latest.tar.gz -C /opt/puppet_webhook
wget -qO - "https://bintray.com/user/downloadSubjectPublicKey?username=voxpupuli" | sudo apt-key add -
echo "deb https://dl.bintray.com/voxpupuli/deb $(grep "VERSION_CODENAME=" /etc/os-release |awk -F= '{print $2}') main" | sudo tee -a /etc/apt/sources.list.d/voxpupuli.list
sudo apt update
```
3. Enter the install directory and install dependencies:

Install puppet_webhook
```bash
$ cd /opt/puppet_webhook && bundle install
sudo apt install puppet-webhook
```
4. Start the process:

#### RedHat/CentOS/Oracle/Amazon

Download the voxpupuli.repo file
```bash
$ bundle exec puma config.ru
wget https://raw.githubusercontent.com/voxpupuli/puppet_webhook/master/build/repos/voxpupuli.repo -o voxpupuli.repo
sudo mv voxpupuli.repo /etc/yum.repos.d/voxpupuli.repo
```

Install puppet_webhook
```
yum install puppet-webhook
```

#### Docker Compose
Expand All @@ -59,11 +68,23 @@ $ wget -O docker-compose.yml https://raw.githubusercontent.com/voxpupuli/puppet_
2. Edit the image, environment, and volumes keys based on your own needs.
3. run `docker-compose up`

#### What about RPM/DEB/Arch/Helm/ETC
#### Generic

Packages for RPM and Deb systems are in the works, but are taking a bit longer to roll out due to needing to package the dependencies with the application. An Arch package is also on the way.
This assumes you already have the correct Ruby version installed in the system or via a tool like `rbenv`, `rvm`, or `asdf`.

A Helm chart is planned for the future, but not currently in development as we work to iron out any issues with the Webhook API Server after the initial 2.x release.
1. Download the latest release from the [Releases](https://github.com/voxpupuli/puppet_webhook/releases) page.
2. Extract the tarball into the desired directory:
```bash
$ tar -xzvf puppet_webhook-latest.tar.gz -C /opt/puppet_webhook
```
3. Enter the install directory and install dependencies:
```bash
$ cd /opt/puppet_webhook && bundle install
```
4. Start the process:
```bash
$ bundle exec puma config.ru
```

## Configuration

Expand Down
7 changes: 7 additions & 0 deletions build/repos/voxpupuli.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[voxpupuli]
name=voxpupuli
baseurl=https://dl.bintray.com/voxpupuli/rpm/el/$releasever/$basearch
gpgcheck=0
repo_gpgcheck=1
enabled=1
gpgkey="https://bintray.com/user/downloadSubjectPublicKey?username=voxpupuli"
3 changes: 2 additions & 1 deletion build/vanagon/components/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
pkg.url 'https://github.com/voxpupuli/puppet_webhook'

if platform.is_deb?
pkg.build_requires 'sqlite3'
pkg.requires 'sqlite3'
pkg.requires 'redis-server'
elsif platform.is_el?
build_requires 'sqlite-devel'
pkg.requires 'sqlite'
pkg.requires 'redis'
else
raise("Plaform #{platform.name} is not yet supported")
end

pkg.build_requires 'ruby-2.6'
pkg.build_requires 'sqlite3'
pkg.build_requires 'runtime'
pkg.environment 'PATH', '/opt/voxpupuli/webhook/bin:$(PATH)'
pkg.environment 'GEM_HOME', '/opt/voxpupuli/webhook/lib/ruby/2.6.0'
Expand Down
2 changes: 1 addition & 1 deletion build/vanagon/components/ruby-2.6.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

pkg.environment 'optflags', '-O2'

special_flags = " --prefix=#{ruby_dir} --with-opt-dir=#{settings[:prefix]} --enable-dtrace --with-baseruby=#{host_ruby}"
special_flags = " --prefix=#{ruby_dir} --with-opt-dir=#{settings[:prefix]} --with-baseruby=#{host_ruby} --with-compress-debug-sections=no"

pkg.configure do
[
Expand Down
13 changes: 13 additions & 0 deletions build/vanagon/platforms/debian-10-amd64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
platform "debian-9-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "buster"

plat.docker_image 'voxpupuli/pkg_builder:buster'
plat.docker_run_args '--privileged=true'

plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.output_dir File.join("deb", plat.get_codename)
end
13 changes: 13 additions & 0 deletions build/vanagon/platforms/debian-9-amd64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
platform "debian-9-amd64" do |plat|
plat.servicedir "/lib/systemd/system"
plat.defaultdir "/etc/default"
plat.servicetype "systemd"
plat.codename "stretch"

plat.docker_image 'voxpupuli/pkg_builder:stretch'
plat.docker_run_args '--privileged=true'

plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot"
plat.install_build_dependencies_with "DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends "
plat.output_dir File.join("deb", plat.get_codename)
end
27 changes: 27 additions & 0 deletions build/vanagon/platforms/el-7-x86_64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
platform "el-7-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

plat.docker_image "voxpupuli/pkg_builder:el7"
plat.docker_run_args "--privileged=true"

plat.provision_with "yum update -y; yum groupinstall --assumeyes 'Development Tools'; yum install --assumeyes autoconf automake createrepo devscripts fakeroot rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign"
plat.install_build_dependencies_with "yum install --assumeyes"

packages = %w[
bzip2-devel
readline-devel
make
pkgconfig
zlib-devel
pl-cmake
pl-gcc
systemtap-sdt-devel
java-1.8.0-openjdk-headless
]

plat.provision_with "yum install --assumeyes #{packages.join(' ')}"

plat.output_dir File.join('el', 'PC1')
end
27 changes: 27 additions & 0 deletions build/vanagon/platforms/el-8-x86_64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
platform "el-8-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

plat.docker_image "voxpupuli/pkg_builder:el8"
plat.docker_run_args "--privileged=true"

plat.provision_with "yum update -y; yum groupinstall --assumeyes 'Development Tools'; yum install --assumeyes autoconf automake createrepo rsync gcc make rpmdevtools rpm-libs yum-utils rpm-sign"
plat.install_build_dependencies_with "yum install --assumeyes"

packages = %w[
bzip2-devel
readline-devel
make
pkgconfig
zlib-devel
pl-cmake
pl-gcc
systemtap-sdt-devel
java-1.8.0-openjdk-headless
]

plat.provision_with "yum install --assumeyes #{packages.join(' ')}"

plat.output_dir File.join('el', 'PC1')
end
30 changes: 30 additions & 0 deletions build/vanagon/platforms/ubuntu-16.04-amd64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true

platform 'ubuntu-16.04-amd64' do |plat|
plat.defaultdir '/etc/default'
plat.servicetype 'systemd'
plat.codename 'xenial'
plat.servicedir '/etc/systemd/system'

plat.docker_image 'voxpupuli/pkg_builder:xenial'
plat.docker_run_args '--privileged=true'

plat.provision_with 'export DEBIAN_FRONTEND=noninteractive; apt-get update -qq; apt-get install -qy --no-install-recommends build-essential devscripts make quilt pkg-config debhelper rsync fakeroot'
plat.install_build_dependencies_with 'DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends --allow-unauthenticated'

packages = [
'libbz2-dev',
'libreadline-dev',
'make',
'pkg-config',
'zlib1g-dev',
'pl-cmake',
'pl-gcc',
'systemtap-sdt-dev',
'openjdk-8-jre-headless'
]

plat.provision_with "export DEBIAN_FRONTEND=noninteractive; apt-get install -qy --no-install-recommends #{packages.join(' ')}"

plat.output_dir File.join('deb', plat.get_codename, 'PC1')
end

0 comments on commit e700f2e

Please sign in to comment.