Skip to content

Commit 888232c

Browse files
committed
changes
1 parent 15d5d00 commit 888232c

File tree

2 files changed

+33
-26
lines changed

2 files changed

+33
-26
lines changed

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1-
Role Name
2-
=========
1+
# Install solr
32

4-
A brief description of the role goes here.
3+
## Install the latest Python and setup a new Python virtualenv
54

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+
```
811

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
1013

11-
Role Variables
12-
--------------
14+
```bash
15+
pip install setuptools_rust wheel
16+
pip install --upgrade pip
17+
pip install ansible selinux setools
18+
```
1319

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
1521

16-
Dependencies
17-
------------
22+
### Create a directory for the ansible role.
1823

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+
```
2027

21-
Example Playbook
22-
----------------
28+
### Clone the solr ansible role.
2329

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+
```
2533

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).
2935

30-
License
31-
-------
36+
```bash
37+
cd ~/.ansible/roles/computate.computate_solr
38+
ansible-playbook -K install.yml
39+
```
3240

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).

tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@
128128
when: ansible_pkg_mgr == 'homebrew'
129129
changed_when: false
130130

131+
- name: "hold until Solr is up and running at http://localhost:{{ APP_PORT }}"
132+
wait_for:
133+
host: "localhost"
134+
port: "{{ APP_PORT }}"
135+
131136
- name: Check for existing solr configset computate
132137
shell: "{{ APP_OPT }}/server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:{{ ZOOKEEPER_PORT }} -cmd ls /configs/computate"
133138
ignore_errors: true

0 commit comments

Comments
 (0)