Local Installation
Prerequisites
If you are using a VM make sure it has at least 8 GB of RAM (It may work with 4 GB, but with 2 GB it
does give issues).
Create MUSIC Install dir /opt/app/music
Ensure you have OpenJDK 8, and maven on your machine.
NOTE: If you are having trouble with some of the apt-get installation packages, enter the name of the vm alongside localhost in the line for 127.0.0.1 in /etc/hosts. Some of the apt-get installation may require this.
MUSIC Installation Instructions
Cassandra Installation
- Download Apache Cassandra 3.0, install into /opt/app/music and follow these instructions http://cassandra.apache.org/doc/latest/getting_started/installing.html
Create a user in Cassandra
Edit conf/cassandra.yaml file
authenticator: PasswordAuthenticator authorizer: CassandraAuthorizer
- Restart Cassandra
Login to cqlsh with default credentials (cqlsh can be found in $CASSANDRA_HOME/bin directory)
./cqlsh -u cassandra -p cassandra
Change default user create new user with the following command. Fill in a username/password below and remember this username/password for music properties.
CREATE USER <new_user> WITH PASSWORD ‘<new_password>’ SUPERUSER;
Change password for default user ‘cassandra’ so that no one will be able to login without proper authorization:
ALTER USER cassandra WITH PASSWORD ‘<SomeLongRandomStringNoonewillthinkof>’;
Test to make sure Cassandra is running correctly by accessing it through cqlsh using the credentials created in step 4.
./cqlsh -u <new_user> -p <new_password>
Zookeeper Installation
- Download Apache Zookeeper 3.4, install into /opt/app/music and follow these instructions https://zookeeper.apache.org/doc/r3.4.11/zookeeperStarted.html pertaining to the standalone operation. By the end of this you should have Zookeeper working.
Tomcat Installation
- Download the Version 8.5 Apache Tomcat https://tomcat.apache.org/download-80.cgi (this is for version 8.5) into /opt/app/music/.
- Follow RUNNING.txt instructions for completing tomcat installation. This file can be found in the tomcat directory. Or look at https://tomcat.apache.org/tomcat-8.5-doc/setup.html#Introduction for more in depth instructions
Music Installation
- Create a music.properties file and place it in /opt/app/music/etc/.
- Here is a sample of the file, the cassandra.user & cassandra.password should be replaced by your values from step 4 of Cassandra installation above.
my.id=0 all.ids=0 my.public.ip=localhost all.public.ips=localhost ####################################### # Optional current values are defaults ####################################### # If using docker this would point to the specific docker name. #zookeeper.host=localhost #cassandra.host=localhost #music.ip=localhost #debug=true #music.rest.ip=localhost #lock.lease.period=6000 # Cassandra Login - Do not user cassandra/cassandra cassandra.user=<new_user> cassandra.password=<new_password> # AAF Endpoint #aaf.endpoint.url=<aaf url>
Make a directory for MUSIC logs. The logs will be placed here after MUSIC starts
music.propertiesmkdir /opt/app/music/logs
Build the MUSIC.war and place in tomcat webapps dir.
Download MUSIC from the Music Gerrit into your music folder (/opt/app/music/)
cd /opt/app/music/ git clone https://gerrit.onap.org/r/music
Build music using maven
cd music # If you installed settings.xml in your ./m2 folder mvn clean package
If the build is successful, you will find the MUSIC.war in the ./target folder. Copy this to your tomcat's webapp folder
cp target/MUSIC.WAR $TOMCAT_HOME/webapps
Start tomcat and you should now have MUSIC running.
There is a folder called postman that contains a postman collection for testing with postman.
Continue with Authentication