Instrumental | 97083ef | 2018-04-25 15:22:38 -0500 | [diff] [blame] | 1 | #!/bin/bash |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 2 | |
Instrumental | 2fe00d0 | 2018-05-11 06:30:40 -0500 | [diff] [blame] | 3 | docker exec aaf_cass mkdir -p /opt/app/cass_init |
| 4 | docker cp "../src/main/cql/." aaf_cass:/opt/app/cass_init |
Instrumental | f482ea0 | 2018-04-10 15:03:24 -0500 | [diff] [blame] | 5 | |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 6 | echo "Docker Installed Basic Cassandra on aaf_cass. Executing the following " |
| 7 | echo "NOTE: This creator provided is only a Single Instance. For more complex Cassandra, create independently" |
| 8 | echo "" |
| 9 | echo " cd /opt/app/cass_init" |
| 10 | echo " cqlsh -u root -p root -f keyspace.cql" |
| 11 | echo " cqlsh -u root -p root -f init.cql" |
| 12 | echo " cqlsh -u root -p root -f osaaf.cql" |
| 13 | echo "" |
| 14 | echo "The following will give you a temporary identity with which to start working, or emergency" |
| 15 | echo " cqlsh -u root -p root -f temp_identity.cql" |
Instrumental | 2fe00d0 | 2018-05-11 06:30:40 -0500 | [diff] [blame] | 16 | echo "Sleeping for 20 seconds" |
| 17 | sleep 20 |
| 18 | echo "Do a repair, to ensure Cassandra is actually running yet" |
| 19 | docker exec -it aaf_cass bash -c 'nodetool repair' |
| 20 | |
| 21 | echo "Create Keyspaces and Tables"" |
Instrumental | 71037c3 | 2018-03-26 13:51:48 -0700 | [diff] [blame] | 22 | docker exec -it aaf_cass bash -c '\ |
| 23 | cd /opt/app/cass_init; \ |
| 24 | echo "Creating Keyspace";cqlsh -u root -p root -f keyspace.cql;\ |
| 25 | echo "Creating init";cqlsh -u root -p root -f init.cql;\ |
| 26 | echo "Creating osaaf";cqlsh -u root -p root -f osaaf.cql;\ |
| 27 | echo "Creating temp Identity";cqlsh -u root -p root -f temp_identity.cql' |
| 28 | |
| 29 | echo "Inspecting aafcassadra. Use to get the IP address to update org.osaaf.cassandra.props" |
| 30 | docker inspect aaf_cass | grep '"IPAddress' | head -1 |