Skip to content

Commit

Permalink
Release 1.6.0
Browse files Browse the repository at this point in the history
Merge branch 'develop' into master
  • Loading branch information
lae committed Aug 4, 2019
2 parents 3d188ec + 4b5a86d commit 383115c
Show file tree
Hide file tree
Showing 21 changed files with 423 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@

ansible.cfg
*.retry
/.project
/.pydevproject
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ cache:
matrix:
fast_finish: true
env:
- ANSIBLE_GIT_VERSION='devel' # 2.8.x development branch
- ANSIBLE_GIT_VERSION='devel' # 2.9.x development branch
- ANSIBLE_VERSION='<2.9.0' # 2.8.x
- ANSIBLE_VERSION='<2.8.0' # 2.7.x
- ANSIBLE_VERSION='<2.7.0' # 2.6.x
install:
- if [ "$ANSIBLE_GIT_VERSION" ]; then pip install "https://github.com/ansible/ansible/archive/${ANSIBLE_GIT_VERSION}.tar.gz";
else pip install "ansible${ANSIBLE_VERSION}"; fi;
pip install --pre ansible-lint; pip install jmespath
- ansible --version
- ansible-galaxy install lae.travis-lxc
- ansible-galaxy install lae.travis-lxc,v0.8.1
- ansible-playbook tests/install.yml -i tests/inventory
- git archive --format tar.gz HEAD > lae.proxmox.tar.gz && ansible-galaxy install
lae.proxmox.tar.gz,$(git rev-parse HEAD),lae.proxmox && rm lae.proxmox.tar.gz
Expand Down
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Installs and configures a Proxmox 5.x cluster with the following features:
- Ensures all hosts can connect to one another as root
- Ability to create/manage groups, users, access control lists and storage
- Ability to create or add nodes to a PVE cluster
- Ability to setup Ceph on the nodes
- IPMI watchdog support
- BYO HTTPS certificate support
- Ability to use either `pve-no-subscription` or `pve-enterprise` repositories
Expand Down Expand Up @@ -386,12 +387,21 @@ pve_watchdog_ipmi_timeout: 10 # Number of seconds the watchdog should wait
pve_zfs_enabled: no # Specifies whether or not to install and configure ZFS packages
# pve_zfs_options: "" # modprobe parameters to pass to zfs module on boot/modprobe
# pve_zfs_zed_email: "" # Should be set to an email to receive ZFS notifications
pve_ceph_enabled: false # Specifies wheter or not to install and configure Ceph packages. See below for an example configuration.
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}" # Ceph cluster network
pve_ceph_mon_group: "{{ pve_group }}" # Host group containing all Ceph monitor hosts
pve_ceph_mds_group: "{{ pve_group }}" # Host group containing all Ceph metadata server hosts
pve_ceph_osds: [] # List of OSD disks
pve_ceph_pools: [] # List of pools to create
pve_ceph_fs: [] # List of CephFS filesystems to create
pve_ceph_crush_rules: [] # List of CRUSH rules to create
# pve_ssl_private_key: "" # Should be set to the contents of the private key to use for HTTPS
# pve_ssl_certificate: "" # Should be set to the contents of the certificate to use for HTTPS
pve_ssl_letsencrypt: false # Specifies whether or not to obtain a SSL certificate using Let's Encrypt
pve_groups: [] # List of group definitions to manage in PVE. See section on User Management.
pve_users: [] # List of user definitions to manage in PVE. See section on User Management.
pve_storages: [] # List of storages to manage in PVE. See section on Storage Management.
pve_datacenter_cfg: {} # Dictionary to configure the PVE datacenter.cfg config file.
```

To enable clustering with this role, configure the following variables appropriately:
Expand All @@ -412,6 +422,15 @@ pve_cluster_bindnet0_addr: "{{ pve_cluster_ring0_addr }}"
```

You can set options in the datacenter.cfg configuration file:
```
pve_datacenter_cfg:
keyboard: en-us
```

All configuration options supported in the datacenter.cfg file are documented in the
[Proxmox manual datacenter.cfg section][datacenter-cfg].

## Dependencies

This role does not install NTP, so you should configure NTP yourself, e.g. with
Expand Down Expand Up @@ -526,6 +545,47 @@ pve_storages:
Refer to `library/proxmox_storage.py` [link][storage-module] for module
documentation.

## Ceph configuration

This role can configure the Ceph storage system on your Proxmox hosts.

```
pve_ceph_enabled: true
pve_ceph_network: '172.10.0.0/24'
pve_ceph_osds:
# OSD with everything on the same device
- device: /dev/sdc
# OSD with block.db/WAL on another device
- device: /dev/sdd
block.db: /dev/sdb1
# Crush rules for different storage classes
pve_ceph_crush_rules:
- name: ssd
class: ssd
- name: hdd
class: hdd
# 2 Ceph pools for VM disks which will also be defined as Proxmox storages
# Using different CRUSH rules
pve_ceph_pools:
- name: ssd
pgs: 128
rule: ssd
application: rbd
storage: true
- name: hdd
pgs: 32
rule: hdd
application: rbd
storage: true
# A CephFS filesystem not defined as a Proxmox storage
pve_ceph_fs:
- name: backup
pgs: 64
rule: hdd
storage: false
mountpoint: /srv/proxmox/backup
```

## Contributors

Musee Ullah ([@lae](https://github.com/lae), <lae@lae.is>)
Expand All @@ -543,3 +603,4 @@ Fabien Brachere ([@Fbrachere](https://github.com/Fbrachere))
[group-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_group.py
[acl-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_group.py
[storage-module]: https://github.com/lae/ansible-role-proxmox/blob/master/library/proxmox_storage.py
[datacenter-cfg]: https://pve.proxmox.com/wiki/Manual:_datacenter.cfg
13 changes: 13 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,27 @@ pve_watchdog_ipmi_timeout: 10
pve_zfs_enabled: no
# pve_zfs_options: "parameters to pass to zfs module"
# pve_zfs_zed_email: "email address for zfs events"
pve_ceph_enabled: false
pve_ceph_network: "{{ (ansible_default_ipv4.network +'/'+ ansible_default_ipv4.netmask) | ipaddr('net') }}"
pve_ceph_mon_group: "{{ pve_group }}"
pve_ceph_mds_group: "{{ pve_group }}"
pve_ceph_osds: []
pve_ceph_pools: []
pve_ceph_fs: []
pve_ceph_crush_rules: []
# pve_ssl_private_key: "contents of private key"
# pve_ssl_certificate: "contents of certificate"
pve_cluster_enabled: no
pve_cluster_clustername: "{{ pve_group }}"
# PVE 5.x (Debian Stretch) clustering options
pve_cluster_ring0_addr: "{{ ansible_default_ipv4.address }}"
pve_cluster_bindnet0_addr: "{{ pve_cluster_ring0_addr }}"
# pve_cluster_ring1_addr: "another interface's IP address or hostname"
# pve_cluster_bindnet1_addr: "{{ pve_cluster_ring1_addr }}"
# PVE 6.x (Debian Buster) clustering options
pve_cluster_link0_addr: "{{ ansible_default_ipv4.address }}"
# pve_cluster_link1_addr: "another interface's IP address or hostname"
pve_datacenter_cfg: {}
pve_ssl_letsencrypt: false
pve_groups: []
pve_users: []
Expand Down
30 changes: 30 additions & 0 deletions files/proxmox-ve-release-6.x.asc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBFvydv4BEACqs61eF4B+Zz9H0hKJS72SEofK2Gy6a5wZ/Hb4DrGbbfC6fjrO
b3r4ZrM7G355TD5He7qzcGrxJjgGwH+/w6xRyYliIzxD/lp8UJXcmiZHG+MYYJP6
q29NWrbEcqPo6onx2tzNytHIUysqUE+mghXtyMN7KUMip7bDAqx2L51CI180Giv1
wdKUBP2bgKVObyFzK46ZEMzyl2qr9raFnHA8oF1HZRkwwcfSD/dkY7oJvAO1pXgR
8PzcXnXjoRTCyWlYVZYn54y9OjnB+knN8BlSOLNdBkKZs74XyJ9JlQU9ZfzatXXE
hMxdDquIAg+g/W9rLpLz5XAGb2GSNvKrU5otjOdUOnD0k1MpFujsSzRWZCIRnywf
mQ/Lahgo4wYOrQLNGCNdvwMgbwcD9NRjQsPdja94wJNRsmbhFeAKPyF8p3lf9QUH
Y3Vn1iGI6ut7c3uqUv0lKvujroKNc/hFSgcn8bUB+x0OnKE3yEiiGsEyJHGxVhjy
3FsY/h1SNtM57Wwk9zxjNuqp66jZcTu8foLNh6Ct+mFsor2Y6MxKVJvrcb9rXv54
YpQAZUjvZK5gnqOWTWrEZkjtNLoGiyuWOU+2RoqTtRA22u9Vlm5C/lduGC7akbVG
Xd8ocDrq4t5IyM3bqF3oru7zGW0hQgsPwbkQcfOawFkQlGEDzf1TrXTafwARAQAB
tElQcm94bW94IFZpcnR1YWwgRW52aXJvbm1lbnQgNi54IFJlbGVhc2UgS2V5IDxw
cm94bW94LXJlbGVhc2VAcHJveG1veC5jb20+iQJUBBMBCAA+FiEENTR5+DeB1/jt
X1rFe/KBLopuiOAFAlvydv4CGwMFCRLMAwAFCwkIBwIGFQgJCgsCBBYCAwECHgEC
F4AACgkQe/KBLopuiODQZRAAo0kXc090pNskVDr0qB7T2x8UShxvC5E6imZHASq/
ui1wd5Wei+WkPj4ME/1yAvpMrMAq3LbbIgmHbBqzsagQaeL88vWn5c0NtzsrzHoU
+ql5XrCnbnmXBoCGUgiXA3vq0FaemTzfCBGnHPbsOoPlvHZjXPvpnMOomO39o1xa
w2Ny8fhhv651CjPpK7DQF5KoMm3LdjXB6nouErJJZDvUaNmGNhHh4HzWiOSLyaE8
T0UsUR1HqGkzvgE2OuwPjeWFIIRPKeiCFbA+mlEfwb/Lgu6F4D6IsP++ItuG6Q6Y
jAopuK7QXrnFpDfAZmQsbsOgkqqg5dy7xBJATuCPkUk9qMBaeLVqkANq1OlZksPT
ry2399U83i69xsJNW4BBC0JXKWWJpq5d9ZH05OP9wxYR2+K3Hmh4vvkzcgoMEbnF
rFzpH+eGkWxxZS1AGhMJBXGkmm1eW7ZFQVx6o0w9dWRRqDo7UklVNPImtXuso3nI
wuYF0+Dv6PeE8EQWLp4FQGHlaEoUmYFug4xiWF1tCcW6UWy6fEhVAcXbbD0IvUjS
6pL9IKpyOWDJBV0Tya4LmBAzaPB7ljYfEBASvaPVKDcSva6wEM8/vA6Oal2/LVdQ
8TG5eRrtWxeZxZSQknv0v3IhPujyP9dxvhJfZmVZKQx/oPgEWFmGuQ8ggXtNZL/8
72I=
=ssmE
-----END PGP PUBLIC KEY BLOCK-----
8 changes: 8 additions & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@
service:
name: zfs-zed
state: restarted

- name: restart ceph
# Needs to use the systemd module directly to be able to
# reload the systemd daemon
systemd:
name: ceph.service
state: restarted
daemon_reload: true
2 changes: 1 addition & 1 deletion library/proxmox_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
required: true
aliases: [ "storagecontent" ]
type: list
choices: [ "images", "rootdir", "vztmpl", "backup", "iso" ]
choices: [ "images", "rootdir", "vztmpl", "backup", "iso", "snippets" ]
description:
- Contents supported by the storage, not all storage
types support all content types.
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ galaxy_info:
- name: Debian
versions:
- stretch
- buster

galaxy_tags:
- proxmox
Expand Down
Loading

0 comments on commit 383115c

Please sign in to comment.