-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/JoistCassandraChanges
- Loading branch information
Showing
24 changed files
with
784 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Vagrant.configure("2") do |config| | ||
|
||
config.vm.box = 'bento/centos-7.2' | ||
config.vm.provision "shell", :path => "provision.sh" | ||
config.vm.provision "shell", :path => "target/scripts/migration.sh" | ||
config.vm.provision "shell", :path => "target/scripts/server-start.sh" | ||
config.vm.provision "shell", :path => "target/scripts/run-it.sh" | ||
config.vm.provision "shell", :path => "target/scripts/server-stop.sh" | ||
|
||
config.vm.define :wasabiosit do |dev| | ||
dev.vm.hostname = "wasabi.os.it" | ||
dev.vm.boot_timeout = 3000 | ||
|
||
dev.vm.provider "virtualbox" do |v| | ||
v.name = "wasabi.os.it.vbox" | ||
v.memory = 4096 | ||
v.cpus = 4 | ||
v.customize ["modifyvm", :id, "--cableconnected1", "on"] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
############################################################################### | ||
# Copyright 2017 Intuit | ||
# | ||
# 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. | ||
############################################################################### | ||
#!/usr/bin/env bash | ||
|
||
exec > >(tee ./provision.log|logger -t provision -s 2>/dev/console) | ||
|
||
sudo yum -y install wget | ||
sudo yum -y install vim | ||
|
||
# install apache | ||
yum -y install httpd | ||
sudo service httpd start | ||
|
||
# install Oracle JDK | ||
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u92-b14/jdk-8u92-linux-x64.rpm" | ||
sudo yum -y localinstall jdk-8u92-linux-x64.rpm | ||
|
||
cat <<EOF | sudo tee -a /etc/yum.repos.d/datastax.repo | ||
[datastax] | ||
name = DataStax Repo for Apache Cassandra | ||
baseurl = http://rpm.datastax.com/community | ||
enabled = 1 | ||
gpgcheck = 0 | ||
EOF | ||
|
||
sudo yum -y install dsc21 | ||
sudo service cassandra start | ||
sudo systemctl enable cassandra.service | ||
|
||
# install mysql | ||
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm | ||
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm | ||
sudo yum -y update | ||
sudo yum -y install mysql-server | ||
sudo systemctl start mysqld | ||
|
||
# create MySQL db | ||
MYSQL_HOST="localhost" | ||
MYSQL_DBNAME="wasabi" | ||
|
||
mysql -s -N -h $MYSQL_HOST --execute="create database $MYSQL_DBNAME;" | ||
mysql -s -N -h $MYSQL_HOST --execute="create user 'readwrite'@'localhost' identified by 'readwrite';" | ||
mysql -s -N -h $MYSQL_HOST --execute="grant all privileges on wasabi.* to 'readwrite'@'localhost' identified by 'readwrite';" | ||
mysql -s -N -h $MYSQL_HOST --execute="flush privileges;" | ||
|
||
# install runit | ||
curl -s https://packagecloud.io/install/repositories/imeyer/runit/script.rpm.sh | sudo bash | ||
sudo yum -y install runit-2.1.2-3.el7.centos.x86_64 |
31 changes: 31 additions & 0 deletions
31
modules/functional-test/src/main/resources-filtered/cassandra_migration_rc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
############################################################################### | ||
# Copyright 2017 Intuit | ||
# | ||
# 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. | ||
############################################################################### | ||
#!/usr/bin/env bash | ||
|
||
export CASSANDRA_KEYSPACE=${cassandra.experiments.keyspaceName} | ||
export CASSANDRA_KEYSPACE_PREFIX=${cassandra.keyspace.prefix} | ||
|
||
export MIGRATION_SCRIPT_1=/vagrant/target/mutation/${wasabi.cassandra.migration.resource.path} | ||
export CASSANDRA_MIGRATION=/vagrant/target/cassandra-migration-${cassandra.migration.version}-jar-with-dependencies.jar | ||
export CQLSH_HOST=localhost | ||
export CASSANDRA_REPLICATION=1 | ||
|
||
echo CASSANDRA_KEYSPACE $CASSANDRA_KEYSPACE | ||
echo MIGRATION_SCRIPT_1 $MIGRATION_SCRIPT_1 | ||
echo CASSANDRA_MIGRATION $CASSANDRA_MIGRATION | ||
echo CASSANDRA_KEYSPACE_PREFIX $CASSANDRA_KEYSPACE_PREFIX | ||
echo CQLSH_HOST $CQLSH_HOST | ||
echo CASSANDRA_REPLICATION $CASSANDRA_REPLICATION |
Oops, something went wrong.