Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ensure you have OpenJDK 8 on your machine.

Ensure you have maven installed on your machine, and configured for ONAP. To build you will need to ensure you update your settings with the ONAP settings.xml (Workspace and Development Tools)

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

    1. Edit conf/cassandra.yaml file

      Code Block
      languagebash
      themeMidnight
      authenticator: PasswordAuthenticator
      authorizer: CassandraAuthorizer
    2. Restart Cassandra
    3. Login to cqlsh with default credentials (cqlsh can be found in $CASSANDRA_HOME/bin directory)

      Code Block
      languagebash
      themeMidnight
      ./cqlsh -u cassandra -p cassandra
    4. Change default user create new user with the following command. Remember Fill in a username/password below and remember this username/password for music properties.

      Code Block
      languagesql
      themeMidnight
      CREATE USER new<new_useruser> WITH PASSWORD ‘new‘<new_password’password>’ SUPERUSER;
    5. Change password for default user ‘Cassandra’ ‘cassandra’ so that no one will be able to login without proper authorization:

      Code Block
      languagesql
      themeMidnight
      ALTER USER cassandra WITH PASSWORD ‘SomeLongRandomStringNoonewillthinkof’‘<SomeLongRandomStringNoonewillthinkof>’;
      Provide the new user credentials to Music. Update music.properties file and uncomment or add the following:
  • Test to make sure Cassandra is running correctly by accessing it through cqlsh using the credentials created in step 4.

    Code Block
    languagebash
    themeMidnight
    cassandra.user=
    ./cqlsh -u <new_user>
    cassandra.password=
     -p <new_password>
    Test to make sure Cassandra is running correctly by accessing it through cqlsh using the credentials created in step 4.

Zookeeper Installation

Tomcat Installation

Music Installation

  • Create a music.properties file and place it in /opt/app/music/etc/.
  • The Here is a sample of the file, the cassandra.user & cassandra.password were created in should be replaced by your values from step 4 of Cassandra installation above.Here is a sample of the file:
Code Block
languagebash
themeMidnight
titlemusic.properties
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

    dir /opt/app/music/logs MUSIC dir with MUSIC

    directory for MUSIC logs. The logs will be

    created in this dir

    placed here after MUSIC starts

    .
  • Build the MUSIC.war and place in tomcat webapps dir. 
  • Authentications/AAF Setup For Authentication setup.
  • Start tomcat and you should now have MUSIC running.

Extra Cassandra information for Authentication:

...

  • Code Block
    languagebash
    themeMidnight
    titlemusic.properties
    mkdir /opt/app/music/logs
  • Download MUSIC from the Music Gerrit into your music folder (/opt/app/music/)

    Code Block
    languagebash
    themeMidnight
    cd /opt/app/music/
    git clone https://gerrit.onap.org/r/music
  • Build music using maven

...

Build Music

Documentation will be updated to show that. Code can be downloaded from Music Gerrit
To build you will need to ensure you update your settings with the ONAP settings.xml (Workspace and Development Tools)

...

  • Code Block
    languagebash
    themeMidnight
    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

...

  • Code Block
    languagebash
    themeMidnight
    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

...