Skip to content

Commit

Permalink
Issue #6: Allow Solr 4.x, 5.x, and 6.x versions to be managed.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Jul 7, 2017
1 parent 5c6063f commit a483bfb
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,44 @@ Before using this project to build and maintain a Solr images for Docker, you ne

1. Build the Solr Docker image; run this command in the root directory:

ansible-container --var-file vars.yml build
ansible-container --var-file vars-6.x.yml build

1. Once the image is built, you can run `docker images` to see the `acsolr-solr` image that was generated.

Older Solr versions are also supported—specify the vars file for the version you would like to install to switch to that version of Solr. (**Note**: Until 0.9.2+ is released, you must [install and use Ansible Container from source](https://docs.ansible.com/ansible-container/installation.html#running-from-source) due to [this PR only being in devel so far](https://github.com/ansible/ansible-container/pull/609).)

### Run the image as a container

ansible-container run
ansible-container --var_file vars-6.x.yml run

**Note**: The `--var_file` option currently seems to not work with `run`, so you may need to just use `run` alone and paste any relevant variables into the `container.yml` file, at least until [this issue](https://github.com/ansible/ansible-container/issues/643) is resolved.

You should be able to reach the Solr dashboard by accessing [http://localhost:8983/](http://localhost:8983/) in your browser.

(Use `stop` to stop the container, and `destroy` to reset the containers and _all_ images.)

### Push the image to Docker Hub

Currently, the process for updating this image on Docker Hub is manual. Eventually this will be automated via Travis CI using `ansible-container push`.
Currently, the process for updating this image on Docker Hub is manual. Eventually this will be automated via Travis CI using `ansible-container push` (currently, this is waiting on [this issue](https://github.com/ansible/ansible-container/issues/630) to be resolved).

1. Log into Docker Hub on the command line:

docker login --username=geerlingguy

1. Tag the latest version:
1. Tag the latest version (only if this is the latest/default version):

docker tag [image id] geerlingguy/solr:latest

1. Tag the Solr major version:

docker tag [image id] geerlingguy/solr:6.x # or 5.x, 4.x...
docker tag [image id] geerlingguy/solr:6.6.0 # the specific version

1. Push tags to Docker Hub:

docker push geerlingguy/solr:latest
docker push geerlingguy/solr:latest # (if this was just tagged)
docker push geerlingguy/solr:6.x # or 5.x, 4.x...
docker push geerlingguy/solr:6.6.0 # the specific version


## License
Expand Down
9 changes: 9 additions & 0 deletions vars-4.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
java_packages:
- openjdk-8-jdk

solr_remove_cruft: true

solr_version: "4.10.4"

container_start_command: ["/opt/solr/bin/solr", "start", "-f"]
9 changes: 9 additions & 0 deletions vars-5.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
java_packages:
- openjdk-8-jdk

solr_remove_cruft: true

solr_version: "5.5.4"

container_start_command: ["/opt/solr/bin/solr", "start", "-f", "-force"]
9 changes: 9 additions & 0 deletions vars-6.x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
java_packages:
- openjdk-8-jdk

solr_remove_cruft: true

solr_version: "6.6.0"

container_start_command: ["/opt/solr/bin/solr", "start", "-f", "-force"]
3 changes: 0 additions & 3 deletions vars.yml

This file was deleted.

0 comments on commit a483bfb

Please sign in to comment.