Skip to content
Snippets Groups Projects
Commit fe0064db authored by jacobo's avatar jacobo Committed by Gus
Browse files

add how to use ansible role for snowflake

Improve snowflake ansible guide and change the directories

Improve the Snowflake ansible guide
parent f777d561
No related branches found
No related tags found
No related merge requests found
_model: page
---
color: primary
---
title: Ansible role
---
key: 1
---
html: two-columns-page.html
---
subtitle: How to run a standalone Snowflake proxy with Ansible role
---
section_id: snowflake-operations
---
section: Snowflake operations
---
body:
### Features
This Ansible role will install, configure, and operate Snowflake standalone proxy.
- Support for Ubuntu, Debian, Debian, Arch Linux, Fedora and FreeBSD.
- Systemd unit to manage Snowflake service on GNU/Linux and rc script for FreeBSD.
### Requirements
- Python
- Ansible 2.9 or higher
#### 1. Install Ansible
You can install Ansible using `pip`:
```
$ python -m pip install --user ansible
```
Or find other ways to [install Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
#### 2. Download the Ansible role
The Ansible role is called `nvjacobo.snowflake`.
You can find it in [Galaxy repository](https://galaxy.ansible.com/nvjacobo/snowflake) and install using the command line:
```
$ ansible-galaxy install nvjacobo.snowflake
```
#### 3. Create a playbook
Next, create an Ansible playbook to run the new role:
```
- hosts: snowflake
roles:
- nvjacobo.snowflake
```
#### 4. Create an inventory
An inventory is a list of servers that Ansible will automatically manage through the playbook.
```
[snowflake]
ip-address
```
#### 5. Deploy
Finally, by running the playbook, Ansible will deploy the Snowflake standalone proxy.
You can run it as root:
```
$ ansible-playbook -i inventory site.yml -u root
```
Or with sudo:
```
$ ansible-playbook -i inventory site.yml -u username -b
```
#### 6. Manage Snowflake proxy
If the Snowflake proxy host is running systemd, you can manage your Snowflake proxy by using systemd commands: start, status, and stop.
For example:
```
$ ansible all -i inventory -a 'systemctl status snowflake-proxy'
```
For FreeBSD, you can manage your Snowflake proxy by using these rc script commands.
For example:
```
$ ansible all -i inventory -a 'service snowflake status'
```
#### 7. Upgrading your Snowflake proxy
It's important to keep your Snowflake standalone proxy up to date.
Running the Ansible playbook will install the updates:
```
$ ansible-playbook -i inventory site.yml -u root
```
### 8. (Optional) Limiting usage
You can limit the number of clients (Snowflake users) by using the variable `client`.
The maximum concurrent clients by default is unlimited (0 = non limit).
The playbook below has a limit of 300 concurrent clients:
```
- hosts: snowflake
vars:
clients: 300
roles:
- nvjacobo.snowflake
```
**Note:** This Ansible role variable isn't available for FreeBSD.
---
_hidden: no
---
_discoverable: no
......@@ -34,7 +34,8 @@ and your proxy is up and running!
### Ansible
There is now an ansible role to install a Snowflake proxy on Debian, Fedora, ArchLinux, FreeBSD and Ubuntu [created by Jacobo Nájera](https://lists.torproject.org/pipermail/anti-censorship-team/2021-March/000143.html): https://galaxy.ansible.com/nvjacobo/snowflake
There is now an [Ansible role](https://galaxy.ansible.com/nvjacobo/snowflake) to install a Snowflake proxy on Debian, Fedora, Arch Linux, FreeBSD and Ubuntu created by Jacobo Nájera.
Follow the guide to run a [Snowflake with Ansible](/relay/setup/snowflake/standalone/ansible).
### Compiling and running from source
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment