2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Travis で Elasticsearch 5.1 を動かす

Last updated at Posted at 2017-02-26

Travis の制限

  • Travis のデフォルトの Elasticsearch を利用すると旧バージョンが利用される
  • Elasticsearch 5 は Java 8 以上を必要とするが、 Travis のデフォルトは Java 7

解決方法

  • addons 指定を用いて、Java 8 をインストール
  • before_install 指定を用いて、直接 Elasticsearch 5.1 をインストール

.travis.yml

addons:
  apt:
    packages:
      - oracle-java8-set-default
before_install:
  - export JAVA_HOME=/usr/lib/jvm/java-8-oracle
  - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.1.1.deb
  - sudo dpkg -i --force-confnew elasticsearch-5.1.1.deb
  - sudo service elasticsearch restart

何故か export JAVA_HOME が必要な件

oracle-java8-set-default により、自動で JAVA_HOME が設定されると思ったら、設定されないようです。よって手動で export JAVA_HOME=/usr/lib/jvm/java-8-oraclebefore_install で実行。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?