зеркало из https://github.com/microsoft/spinnaker.git
Removed elasticsearch.
This commit is contained in:
Родитель
ecbd891935
Коммит
6ec7ba107d
|
@ -64,5 +64,4 @@ IGOR_ENABLED=false
|
|||
|
||||
# External Dependency Bindings
|
||||
CASSANDRA_HOST=localhost
|
||||
ELASTICSEARCH_HOST=localhost
|
||||
REDIS_HOST=localhost
|
||||
|
|
|
@ -26,7 +26,6 @@ from install_utils import run_or_die
|
|||
|
||||
APACHE2_VERSION='2.4.7-1ubuntu4.5'
|
||||
CASSANDRA_VERSION='2.1.9'
|
||||
ELASTICSEARCH_VERSION='1.4.5'
|
||||
OPENJDK_8_VERSION='8u45-b14-1~14.04'
|
||||
REDIS_SERVER_VERSION='2:2.8.4-2'
|
||||
|
||||
|
@ -49,13 +48,6 @@ def init_argument_parser(parser, default_values={}):
|
|||
parser.add_argument('--nocassandra', dest='cassandra',
|
||||
action='store_false')
|
||||
|
||||
parser.add_argument('--elasticsearch',
|
||||
default=default_values.get('elasticsearch', True),
|
||||
action='store_true',
|
||||
help='Install elasticsearch service.')
|
||||
parser.add_argument('--noelasticsearch', dest='elasticsearch',
|
||||
action='store_false')
|
||||
|
||||
parser.add_argument('--jdk',
|
||||
default=default_values.get('jdk', True),
|
||||
action='store_true',
|
||||
|
@ -120,7 +112,6 @@ def install_runtime_dependencies(options):
|
|||
"""
|
||||
install_java(options, which='jre')
|
||||
install_cassandra(options)
|
||||
install_elasticsearch(options)
|
||||
install_redis(options)
|
||||
install_apache(options)
|
||||
install_os_updates(options)
|
||||
|
@ -253,51 +244,6 @@ def install_redis(options):
|
|||
install_package_or_die('redis-server', version=REDIS_SERVER_VERSION)
|
||||
|
||||
|
||||
def install_elasticsearch(options):
|
||||
"""Install ElasticSearch.
|
||||
|
||||
Args:
|
||||
options: ArgumentParserNamespace options.
|
||||
"""
|
||||
if not options.elasticsearch:
|
||||
print '--noelasticsearch skips Elasticsearch install.'
|
||||
return
|
||||
|
||||
print 'Installing Elasticsearch...'
|
||||
family = (ELASTICSEARCH_VERSION[:ELASTICSEARCH_VERSION.find('.') + 2]
|
||||
if ELASTICSEARCH_VERSION else '1.4')
|
||||
|
||||
if not options.package_manager:
|
||||
root = 'https://download.elastic.co/elasticsearch/elasticsearch'
|
||||
try:
|
||||
os.mkdir('downloads')
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
elasticsearch = 'elasticsearch-{ver}.deb'.format(
|
||||
ver=ELASTICSEARCH_VERSION)
|
||||
content = fetch_or_die('{url}/{elasticsearch}'
|
||||
.format(url=root, elasticsearch=elasticsearch))
|
||||
with open('downloads/{elasticsearch}'
|
||||
.format(elasticsearch=elasticsearch), 'w') as f:
|
||||
f.write(content)
|
||||
run_or_die('sudo dpkg -i downloads/' + elasticsearch, echo=True)
|
||||
else:
|
||||
result = fetch_or_die(
|
||||
'https://packages.elasticsearch.org/GPG-KEY-elasticsearch')
|
||||
|
||||
run_or_die('sudo apt-key add -', input=result, echo=True)
|
||||
|
||||
run_or_die(
|
||||
'sudo add-apt-repository "deb'
|
||||
' http://packages.elasticsearch.org/elasticsearch/{family}/debian'
|
||||
' stable main"'.format(family=family),
|
||||
echo=True)
|
||||
|
||||
run_or_die('sudo apt-get -q -y update', echo=True)
|
||||
install_package_or_die('elasticsearch', version=ELASTICSEARCH_VERSION)
|
||||
|
||||
|
||||
def install_apache(options):
|
||||
"""Install Apache2
|
||||
|
||||
|
|
|
@ -130,13 +130,6 @@ class Runner(object):
|
|||
run_dir=run_dir),
|
||||
echo=True)
|
||||
|
||||
run_or_die(
|
||||
'ELASTICSEARCH_HOST={host}'
|
||||
' {run_dir}/start_elasticsearch.sh'
|
||||
.format(host=self.__bindings.get('ELASTICSEARCH_HOST', 'localhost'),
|
||||
run_dir=run_dir),
|
||||
echo=False)
|
||||
|
||||
def maybe_start_job(self, jobs, subsystem):
|
||||
if subsystem in jobs:
|
||||
print '{subsystem} already running as pid {pid}'.format(
|
||||
|
|
|
@ -235,8 +235,7 @@ class ValidateConfig(object):
|
|||
' but not JENKINS_USERNAME.')
|
||||
|
||||
def verify_external_dependencies(self):
|
||||
ok = self.verify_host('ELASTICSEARCH_HOST', required=False)
|
||||
ok = self.verify_host('CASSANDRA_HOST', required=False) and ok
|
||||
ok = self.verify_host('CASSANDRA_HOST', required=False)
|
||||
ok = self.verify_host('REDIS_HOST', required=False) and ok
|
||||
return ok
|
||||
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2015 Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
ELASTICSEARCH_PORT=${ELASTICSEARCH_PORT:-9200}
|
||||
if nc -z localhost $ELASTICSEARCH_PORT; then
|
||||
echo "Elasticsearch is already up."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Starting Elasticsearch..."
|
||||
sudo service elasticsearch start
|
||||
|
||||
echo "Waiting for Elasticsearch to start accepting requests on port $ELASTICSEARCH_PORT..."
|
||||
while ! nc -z localhost $ELASTICSEARCH_PORT; do sleep 0.1; done
|
||||
echo "Elasticsearch is up."
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2015 Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
sudo service elasticsearch stop
|
|
@ -18,4 +18,3 @@ SPINNAKER_SCRIPT_DIR=/opt/spinnaker/scripts
|
|||
|
||||
$SPINNAKER_SCRIPT_DIR/stop_redis.sh
|
||||
$SPINNAKER_SCRIPT_DIR/stop_cassandra.sh
|
||||
$SPINNAKER_SCRIPT_DIR/stop_elasticsearch.sh
|
||||
|
|
Загрузка…
Ссылка в новой задаче