This article is about Codeship Basic.

Elasticsearch

You will need about one minute to read this article.

Elasticsearch 1.2.2 is installed on the default port 9200 and doesn’t require any credentials. However, it is not running by default. To use Elasticsearch during your builds, start the service with the following command:

This is one of the only commands available via sudo and root access to run any other commands is not available on the build VMs.

sudo /etc/init.d/elasticsearch start

Other Versions

If you need to install a different version or use a custom configuration, please see this script.

For example if you want to install 6.0.0, set that version as an environment variable in your project or add this in the Setup Commands:

export ELASTICSEARCH_VERSION=6.0.0

Next, set the Java version in your Setup Commands. This is required for versions 5 and above.

jdk_switcher home oraclejdk8
jdk_switcher use oraclejdk8

Finally add this command to your Setup Commands and the script will automatically be called at build time. Note, this script will automatically start the Elasticsearch service, so you do not need to call the sudo command mentioned above.

\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/elasticsearch.sh | bash -s

Need more help?

You can post on Stack Overflow using the tag #codeship or contact our Helpdesk.
We also have a couple of code examples and sample projects available for you to get started with.

Was This Article Helpful?

Do you think we need to improve this article? If so, please submit our feedback form to help us improve this article!