|
1 |
| -Role Name |
2 |
| -========= |
| 1 | +# Install solr |
3 | 2 |
|
4 |
| -A brief description of the role goes here. |
| 3 | +## Install the latest Python and setup a new Python virtualenv |
5 | 4 |
|
6 |
| -Requirements |
7 |
| ------------- |
| 5 | +```bash |
| 6 | +sudo yum install -y git python3 python3-pip python3-virtualenv python3-libselinux python3-libsemanage python3-policycoreutils |
| 7 | +virtualenv-3 ~/python |
| 8 | +source ~/python/bin/activate |
| 9 | +echo "source ~/python/bin/activate" | tee -a ~/.bashrc |
| 10 | +``` |
8 | 11 |
|
9 |
| -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. |
| 12 | +## Install the latest Ansible |
10 | 13 |
|
11 |
| -Role Variables |
12 |
| --------------- |
| 14 | +```bash |
| 15 | +pip install setuptools_rust wheel |
| 16 | +pip install --upgrade pip |
| 17 | +pip install ansible selinux setools |
| 18 | +``` |
13 | 19 |
|
14 |
| -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. |
| 20 | +## Install the solr ansible role |
15 | 21 |
|
16 |
| -Dependencies |
17 |
| ------------- |
| 22 | +### Create a directory for the ansible role. |
18 | 23 |
|
19 |
| -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. |
| 24 | +```bash |
| 25 | +install -d ~/.ansible/roles/computate.computate_solr |
| 26 | +``` |
20 | 27 |
|
21 |
| -Example Playbook |
22 |
| ----------------- |
| 28 | +### Clone the solr ansible role. |
23 | 29 |
|
24 |
| -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: |
| 30 | +```bash |
| 31 | +git clone [email protected]:computate-org/computate_solr.git ~/.ansible/roles/computate.computate_solr |
| 32 | +``` |
25 | 33 |
|
26 |
| - - hosts: servers |
27 |
| - roles: |
28 |
| - - { role: username.rolename, x: 42 } |
| 34 | +## Run the solr ansible playbook to install the application locally (requires sudo privileges with -K). |
29 | 35 |
|
30 |
| -License |
31 |
| -------- |
| 36 | +```bash |
| 37 | +cd ~/.ansible/roles/computate.computate_solr |
| 38 | +ansible-playbook -K install.yml |
| 39 | +``` |
32 | 40 |
|
33 |
| -BSD |
34 |
| - |
35 |
| -Author Information |
36 |
| ------------------- |
37 |
| - |
38 |
| -An optional section for the role authors to include contact information, or a website (HTML is not allowed). |
|
0 commit comments