-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Restructure to Ansible collection
- Loading branch information
Showing
24 changed files
with
372 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
namespace: hostinger | ||
name: fireactions | ||
repository: https://github.com/hostinger/ansible-collection-fireactions | ||
version: 0.0.1 | ||
readme: README.md | ||
authors: | ||
- konradasb | ||
description: Ansible collection for deploying Fireactions and required dependencies | ||
license: | ||
- MIT | ||
dependencies: | ||
community.general: ">=4.5.0" | ||
tags: | ||
- fireactions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
requires_ansible: ">=2.11" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
- all | ||
|
||
roles: | ||
- hostinger.fireactions | ||
- hostinger.fireactions.firecracker | ||
- hostinger.fireactions.client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
# client | ||
|
||
Ansible role to install and configure [Fireactions](https://github.com/hostinger/fireactions) client. | ||
|
||
## Requirements | ||
|
||
None. | ||
|
||
## Dependencies | ||
|
||
- hostinger.fireactions.firecracker | ||
- hostinger.fireactions.containerd | ||
- hostinger.fireactions.cni | ||
- hostinger.fireactions.tc-redirect-tap | ||
|
||
## Role Variables | ||
|
||
Available variables are listed below, along with default values (see `defaults/main.yml`): | ||
|
||
```yaml | ||
fireactions_version: 0.1.0 | ||
``` | ||
The version of Fireactions to install. | ||
```yaml | ||
fireactions_install_dir: /opt/fireactions | ||
``` | ||
The installation directory for Fireactions. | ||
```yaml | ||
fireactions_os: linux | ||
``` | ||
The OS to install Fireactions for. Currently only `linux` is supported. | ||
|
||
```yaml | ||
fireactions_arch: amd64 | ||
``` | ||
|
||
The architecture to install Fireactions for. Currently only `amd64` and `arm64` are supported. | ||
|
||
```yaml | ||
fireactions_create_group: true | ||
``` | ||
|
||
Whether to create a group for Fireactions. Useful if you want to run Fireactions with already existing group. | ||
|
||
```yaml | ||
fireactions_group: fireactions | ||
``` | ||
|
||
The group to create for Fireactions. | ||
|
||
```yaml | ||
fireactions_create_owner: true | ||
``` | ||
|
||
Whether to create a user for Fireactions. Useful if you want to run Fireactions with already existing user. | ||
|
||
```yaml | ||
fireactions_owner: fireactions | ||
``` | ||
|
||
The user to create for Fireactions. | ||
|
||
```yaml | ||
fireactions_config_file_path: "{{ fireactions_config_dir }}/config.yml" | ||
``` | ||
|
||
The path to the Fireactions configuration file. | ||
|
||
```yaml | ||
fireactions_config_dir: /etc/fireactions | ||
``` | ||
|
||
The configuration directory for Fireactions. | ||
|
||
```yaml | ||
fireactions_config_server_url: http://127.0.0.1:8080 | ||
``` | ||
|
||
The URL of the Fireactions server. | ||
|
||
```yaml | ||
fireactions_config_organisation: example | ||
``` | ||
|
||
The organisation name for Fireactions. The name must match the organisation name in GitHub. | ||
|
||
```yaml | ||
fireactions_group: us-east-1 | ||
``` | ||
|
||
The group name for Fireactions. The group must already exist in Fireactions server. | ||
|
||
```yaml | ||
fireactions_cpu_overcommit_ratio: 1.0 | ||
``` | ||
|
||
CPU overcommit ratio is the ratio of CPU to allocate to the client compared to the actual CPU cores available on the host. | ||
|
||
```yaml | ||
fireactions_mem_overcommit_ratio: 1.0 | ||
``` | ||
|
||
RAM overcommit ratio is the ratio of RAM to allocate to the client compared to the actual RAM available on the host. | ||
|
||
```yaml | ||
fireactions_log_level: info | ||
``` | ||
|
||
The log level for Fireactions. | ||
|
||
## Example Playbook | ||
|
||
```yaml | ||
- hosts: all | ||
roles: | ||
- role: hostinger.fireactions.client | ||
``` | ||
|
||
## License | ||
|
||
See [LICENSE](LICENSE). |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
- name: Converge | ||
hosts: | ||
- all | ||
|
||
roles: | ||
- client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: ubuntu-22.04 | ||
image: geerlingguy/docker-ubuntu2204-ansible:latest | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
cgroupns_mode: host | ||
pre_build_image: true | ||
privileged: true | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.yml} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[Unit] | ||
Description=Fireactions | ||
Documentation=https://github.com/hostinger/fireactions | ||
Requires=network.target | ||
After=network.target | ||
|
||
[Service] | ||
User={{ fireactions_owner }} | ||
Type=simple | ||
ExecPreStart=/usr/bin/which fireactions | ||
ExecPreStart=/usr/bin/which firecracker | ||
ExecStart=fireactions client start --config {{ fireactions_config_file_path }} | ||
Restart=always | ||
RestartSec=10 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
File renamed without changes.
File renamed without changes.
Empty file.
Oops, something went wrong.