1 ===========================
2 Multi-site or Local Cluster
3 ===========================
4 Follow the instructions for local MUSIC installation on all the machines/VMs/hosts (referred to as a node) on which you want MUSIC installed. However, Cassandra and Zookeeper needs to be configured to run as multi-node installations (instructions below) before running them.
8 In the cassandra.yaml file which is present in the cassa_install/conf directory in each node, set the following parameters:
11 cluster_name: ‘name of cluster’
16 - class_name: org.apache.cassandra.locator.SimpleSeedProvider
18 - seeds: "<public ip of first seed>, <public ip of second seed>, etc"
20 listen_address: private ip of VM
22 broadcast_address: public ip of VM
24 endpoint_snitch: GossipingPropertyFileSnitch
26 rpc_address: <private ip>
28 phi_convict_threshold: 12
30 - In the cassandra-rackdc.properties file, assign data center and rack names as needed if required ( This is for multi data center install).
31 - Once this is done on all three nodes, you can run cassandra on each of the nodes through the cassandra bin folder with this command::
35 - In the cassandra bin folder, if you run the following it will tell you the state of the cluster::
39 - To access cassandra, one any of the nodes you can run the following and then perform CQL queries.::
43 Extra Cassandra information for Authentication:
44 -----------------------------------------------
45 To create first user in Cassandra
47 1. Edit conf/Cassandra.yaml file::
49 authenticator: PasswordAuthenticator
50 authorizer: CassandraAuthorizer
54 3. Login to cqlsh with default credentials::
56 cqlsh -u cassandra -p cassandra
58 4. To change default user create new user with the following command.::
60 CREATE USER new_user WITH PASSWORD ‘new_password’ SUPERUSER;
62 5. Change password for default user ‘Cassandra’ so that no one will be able to login::
64 ALTER USER cassandra WITH PASSWORD ‘SomeLongRandomStringNoonewillthinkof’;
66 6. Provide the new user credentials to Music. Update music.properties file and uncomment or add the following::
68 cassandra.user=<new_user>
69 cassandra.password=<new_password>
71 To access keyspace through cqlsh, login with credentials that are passed to MUSIC while creating the keyspace.
76 Create a music.properties file and place it in /opt/app/music/etc at each node. Here is a sample of the file:
81 my.public.ip=localhost
82 all.public.ips=localhost
83 #######################################
84 # Optional current values are defaults
85 #######################################
86 # If using docker this would point to the specific docker name.
87 #zookeeper.host=localhost
88 #cassandra.host=localhost
91 #music.rest.ip=localhost
92 #lock.lease.period=6000
93 # Cassandra Login - Do not user cassandra/cassandra
94 cassandra.user=cassandra1
95 cassandra.password=cassandra1
97 #aaf.endpoint.url=<aaf url>
99 - Build the MUSIC.war (see `Build Music`_) and place it within the webapps folder of the tomcat installation.
100 - Start tomcat and you should now have MUSIC running.
102 For Logging create a dir /opt/app/music/logs. When MUSIC/Tomcat starts a MUSIC dir with various logs will be created.
106 Documentation will be updated to show that. Code can be downloaded from Music Gerrit.
107 To build you will need to ensure you update your settings with the ONAP settings.xml
108 (Workspace and Development Tools)
110 Once you have done that run the following:
114 # If you installed settings.xml in your ./m2 folder
116 # If you placed the settings.xml elsewhere:
117 mvn clean package -s /path/to/settings.xml
119 After it is built you will find the MUSIC.war in the ./target folder.
121 There is a folder called postman that contains a postman collection for testing with postman.
123 Continue with `Authentication <./automation.rst>`_