Skip to content

Commit 8df3a41

Browse files
authored
Merge branch 'main' into patch-2
2 parents a272483 + 0970301 commit 8df3a41

File tree

11 files changed

+176
-10
lines changed

11 files changed

+176
-10
lines changed

src/.gitbook/assets/schedule01.png

39.8 KB
Loading

src/.gitbook/assets/schedule02.png

18.8 KB
Loading

src/.gitbook/assets/schedule03.png

16.7 KB
Loading

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* [Package manager](./administration-guide/installation/package-manager.md)
88
* [Docker](./administration-guide/installation/docker.md)
99
* [Binary file](./administration-guide/installation/binary-file.md)
10+
* [Kubernetes (Helm chart)](./administration-guide/installation/k8s.md)
1011
* [Snap (deprecated)](./administration-guide/installation/snap.md)
1112
* [Manual Installation](./administration-guide/installation\_manually.md)
1213
* [Configuration](./administration-guide/configuration.md)

src/administration-guide/installation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Installation
22

3-
You can install Semaphore in 4 ways:
3+
You can install Semaphore in multiple ways:
44

55
* [Package manager](./installation/package-manager)
66
* [Docker](./installation/docker)
77
* [Binary file](./installation/binary-file)
8+
* [Kubernetes (Helm chart)](./installation/k8s)
89
* [Snap (deprecated)](./installation/snap)
910

1011
See also:

src/administration-guide/installation/binary-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Semaphore will be available via the following URL [https://localhost:3000](https
6262

6363
### Run as a service
6464

65-
For more detailed information — look into the [extended Systemd service documentation](./installation_manually.md#extended-systemd-service).
65+
For more detailed information — look into the [extended Systemd service documentation](../installation_manually.md#extended-systemd-service).
6666

6767
If you installed Semaphore via a package manager, or by downloading a binary file, you should create the Semaphore service manually.
6868

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="breadcrumbs">
2+
<a href="/administration-guide/installation">Installation</a>
3+
→ Kubernetes
4+
</div>
5+
6+
# Kubernetes (Helm chart)
7+
8+
Semaphore provides a helm chart for installation on Kubernetes.
9+
10+
A thorough documentation can be found on artifacthub.io: [Semaphore Helm Chart](https://artifacthub.io/packages/helm/semaphoreui/semaphore).

src/administration-guide/installation/snap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ After installation, you can set up Semaphore via [Snap Configuration](https://sn
4646
sudo snap get semaphore
4747
```
4848

49-
&#x20;List of available options you can find in [Configuration options reference](./configuration#configuration-options).
49+
&#x20;List of available options you can find in [Configuration options reference](../configuration.md#configuration-options).
5050

51-
----
51+
----

src/administration-guide/openid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ All SSO provider options:
4747
| `scopes` | |
4848
| `username_claim` | Username claim expression[\*](#claim-expression). |
4949
| `email_claim` | Email claim expression[\*](#claim-expression). |
50-
| `name_claim` | Profile Name claim expression[\*](openid/#claim-expression). |
50+
| `name_claim` | Profile Name claim expression[\*](#claim-expression). |
5151
| `order` | Position of the provider button on the Sign in screen. |
5252
| `endpoint.issuer` | |
5353
| `endpoint.auth` | |

src/user-guide/schedules.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,111 @@
11
# Schedules
2+
3+
The schedule function in Semaphore allows to automate the execution of templates (e.g. playbook runs) at predefined intervals. This feature allows to implement routine automation tasks, such as regular backups, compliance checks, system updates, and more.
4+
5+
## Setup and Configuration
6+
7+
### Accessing the Schedule Feature
8+
9+
1. Log in to your Ansible Semaphore web interface
10+
2. Navigate to the "Schedule" tab in the main navigation menu
11+
3. Click the "New Schedule" button in the top right corner to create a new schedule
12+
13+
![](<../.gitbook/assets/schedule01.png>)
14+
15+
### Creating a New Schedule
16+
17+
When creating a new schedule, you'll need to configure the following options:
18+
19+
| Field | Description |
20+
|-------|-------------|
21+
| Name | A descriptive name for the scheduled task |
22+
| Template | The specific Task Template to execute |
23+
| Timing | Either in cron format for more fexibility or using the built-in options for common intervals |
24+
25+
![](<../.gitbook/assets/schedule02.png>) ![](<../.gitbook/assets/schedule03.png>)
26+
27+
### Cron Format Syntax
28+
29+
The schedule uses standard cron syntax with five fields:
30+
31+
```
32+
┌─────── minute (0-59)
33+
│ ┌────── hour (0-23)
34+
│ │ ┌───── day of month (1-31)
35+
│ │ │ ┌───── month (1-12)
36+
│ │ │ │ ┌───── day of week (0-6) (Sunday=0)
37+
│ │ │ │ │
38+
│ │ │ │ │
39+
* * * * *
40+
```
41+
42+
Examples:
43+
- `*/15 * * * *` - Run every 15 minutes
44+
- `0 2 * * *` - Run at 2:00 AM every day
45+
- `0 0 * * 0` - Run at midnight on Sundays
46+
- `0 9 1 * *` - Run at 9:00 AM on the first day of every month
47+
48+
Very helpful cron expression generator: [https://crontab.guru/](https://crontab.guru/)
49+
50+
## Use Cases
51+
52+
### System Maintenance
53+
54+
```yaml
55+
# Example playbook for system updates
56+
---
57+
- hosts: all
58+
become: yes
59+
tasks:
60+
- name: Update apt cache
61+
apt:
62+
update_cache: yes
63+
64+
- name: Upgrade all packages
65+
apt:
66+
upgrade: yes
67+
68+
- name: Remove dependencies that are no longer required
69+
apt:
70+
autoremove: yes
71+
```
72+
73+
Schedule this playbook to run weekly during off-hours to ensure systems stay up-to-date.
74+
75+
### Backup Operations
76+
77+
Create schedules for database backups with different frequencies:
78+
- Daily backups that retain for one week
79+
- Weekly backups that retain for one month
80+
- Monthly backups that retain for one year
81+
82+
### Compliance Checks
83+
84+
Schedule regular compliance scans to ensure systems meet security requirements:
85+
86+
```yaml
87+
# Example compliance check playbook
88+
---
89+
- hosts: all
90+
tasks:
91+
- name: Run compliance checks
92+
script: /path/to/compliance_script.sh
93+
94+
- name: Collect compliance reports
95+
fetch:
96+
src: /var/log/compliance-report.log
97+
dest: reports/{{ inventory_hostname }}/
98+
flat: yes
99+
```
100+
101+
### Environment Provisioning and Cleanup
102+
103+
For development or testing environments. Schedule cloud environment creation in the morning and teardown in the evening to optimize costs.
104+
105+
## Best Practices
106+
107+
* Use descriptive names for schedules that indicate both function and timing (e.g. "Weekly-Backup-Sunday-2AM")
108+
* Avoid scheduling too many resource-intensive tasks concurrently
109+
* Consider the effect of long-running scheduled tasks on other schedules
110+
* Test schedules with short intervals before setting up production schedules with longer intervals
111+
* Document the purpose and expected outcomes of scheduled tasks

0 commit comments

Comments
 (0)