Skip to content

Commit

Permalink
Merge pull request #43 from Dmitriusan/feature/update_documentation_a…
Browse files Browse the repository at this point in the history
…nd_versions

Update documentation and versions, trigger tests for newer versions
  • Loading branch information
istvano authored Jul 3, 2023
2 parents c34a854 + 8e0b5d9 commit ffe641a
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ local.properties
.loadpath
.recommenders

# Intellij Idea
*.iml
.idea/*

# External tool builders
.externalToolBuilders/

Expand Down
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ jobs:
- MOLECULE_SCENARIO=debian_min
- env:
- MOLECULEW_ANSIBLE=2.7.15
- MOLECULE_SCENARIO=ubuntu_max
- MOLECULE_SCENARIO=ubuntu_jammy
- env:
- MOLECULEW_ANSIBLE=2.7.15
- MOLECULE_SCENARIO=ubuntu_min
- MOLECULE_SCENARIO=ubuntu_focal
- env:
- MOLECULEW_ANSIBLE=2.7.15
- MOLECULE_SCENARIO=ubuntu_bionic
- env:
- MOLECULEW_ANSIBLE=2.7.15
- MOLECULE_SCENARIO=ubuntu_xenial
- env:
- MOLECULEW_ANSIBLE=2.9.1
- MOLECULE_SCENARIO=centos
Expand All @@ -36,10 +42,16 @@ jobs:
- MOLECULE_SCENARIO=debian_min
- env:
- MOLECULEW_ANSIBLE=2.9.1
- MOLECULE_SCENARIO=ubuntu_max
- MOLECULE_SCENARIO=ubuntu_jammy
- env:
- MOLECULEW_ANSIBLE=2.9.1
- MOLECULE_SCENARIO=ubuntu_focal
- env:
- MOLECULEW_ANSIBLE=2.9.1
- MOLECULE_SCENARIO=ubuntu_bionic
- env:
- MOLECULEW_ANSIBLE=2.9.1
- MOLECULE_SCENARIO=ubuntu_min
- MOLECULE_SCENARIO=ubuntu_xenial

# Require Ubuntu 16.04
dist: xenial
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Role to download and install [microk8s](https://microk8s.io/) the smallest, simp
* Ubuntu
* Xenial (16.04)
* Bionic (18.04)
* Focal (20.04) (untested)
* Jammy (22.04) (untested)
* Arch Linux (untested)

## License
Expand All @@ -23,7 +25,7 @@ MIT
Some variables available in this role are listed here. The full set is
defined in `[defaults/main.yml](defaults/main.yml)`.

* `microk8s_version`: Version to use, defaults to `1.19/stable`.
* `microk8s_version`: Version to use, defaults to `1.27/stable`.
* `microk8s_plugins`: Enable/disable various plugins. A string will be passed as `arg` when enabling addon using `name:arg`
* `microk8s_enable_HA`: Enable/disable high-availability.
* `microk8s_group_HA`: Hostgroup whose members will form HA cluster.
Expand All @@ -43,6 +45,8 @@ defined in `[defaults/main.yml](defaults/main.yml)`.
istio: true
ingress: true
```
Note: when overriding plugins list, it is recommended to copy-paste the entire list of plugins from the
`defaults/main.yml` because some Ansible tasks reference them (e.g. `helm3`) and the deployment may fail.

### Custom certificate request template

Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#

# version management
microk8s_version: "1.22/stable"
microk8s_version: "1.27/stable"
microk8s_disable_snap_autoupdate: false

# plugin configuration
Expand All @@ -16,7 +16,7 @@ microk8s_plugins:
ingress: true # Ingress controller for external access
metrics-server: true # K8s Metrics Server for API access to service metrics
rbac: true # Role-Based Access Control for authorisation
storage: true # Storage class; allocates storage from host directory
hostpath-storage: true # Storage class; allocates storage from host directory
registry: "size={{ registry_size }}" # Private image registry exposed on localhost:32000
dashboard: true # The Kubernetes dashboard
ambassador: false # Ambassador API Gateway and Ingress
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lint: |
ansible-lint .
platforms:
- name: ansible_role_microk8s_ubuntu_max
- name: ansible_role_microk8s_ubuntu_bionic
image: ubuntu:18.04
dockerfile: ../default/Dockerfile.j2

Expand All @@ -23,7 +23,7 @@ provisioner:
name: ansible-lint

scenario:
name: ubuntu_max
name: ubuntu_bionic

verifier:
name: testinfra
Expand Down
File renamed without changes.
32 changes: 32 additions & 0 deletions molecule/ubuntu_focal/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
dependency:
name: galaxy

driver:
name: docker

lint: |
set -e
yamllint .
ansible-lint .
platforms:
- name: ansible_role_microk8s_ubuntu_focal
image: ubuntu:20.04
dockerfile: ../default/Dockerfile.j2

provisioner:
name: ansible
playbooks:
converge: ../default/playbook.yml
lint:
name: ansible-lint

scenario:
name: ubuntu_focal

verifier:
name: testinfra
directory: ../default/tests
lint:
name: flake8
22 changes: 22 additions & 0 deletions molecule/ubuntu_jammy/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*******
Docker driver installation guide
*******

Requirements
============

* Docker Engine

Install
=======

Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.

.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site

.. code-block:: bash
$ pip install 'molecule[docker]'
32 changes: 32 additions & 0 deletions molecule/ubuntu_jammy/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
dependency:
name: galaxy

driver:
name: docker

lint: |
set -e
yamllint .
ansible-lint .
platforms:
- name: ansible_role_microk8s_ubuntu_jammy
image: ubuntu:22.04
dockerfile: ../default/Dockerfile.j2

provisioner:
name: ansible
playbooks:
converge: ../default/playbook.yml
lint:
name: ansible-lint

scenario:
name: ubuntu_jammy

verifier:
name: testinfra
directory: ../default/tests
lint:
name: flake8
22 changes: 22 additions & 0 deletions molecule/ubuntu_xenial/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*******
Docker driver installation guide
*******

Requirements
============

* Docker Engine

Install
=======

Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.

.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site

.. code-block:: bash
$ pip install 'molecule[docker]'
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lint: |
ansible-lint .
platforms:
- name: ansible_role_microk8s_ubuntu_min
- name: ansible_role_microk8s_ubuntu_xenial
image: ubuntu:16.04
dockerfile: ../default/Dockerfile.j2

Expand All @@ -23,7 +23,7 @@ provisioner:
name: ansible-lint

scenario:
name: ubuntu_min
name: ubuntu_xenial

verifier:
name: testinfra
Expand Down

0 comments on commit ffe641a

Please sign in to comment.