060f02b4f9aaa814b6cec9bb2656cd4aa71bea2d
[music.git] / docs / single.rst
1 ======================
2 Single VM/Site install
3 ======================
4 Local Installation
5 ------------------
6 Prerequisites
7
8 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
9 does give issues).
10
11 Instructions
12
13 - Create MUSIC Install dir /opt/app/music
14 - Open /etc/hosts as sudo and enter the name of the vm alongside localhost in the line for 127.0.0.1. E.g. 127.0.0.1 localhost music-1. Some of the apt-get installation seem to require this.
15 - Ensure you have OpenJDK 8 on your machine.
16 - Download Apache Cassandra 3.0, install into /opt/app/music and follow these instructions http://cassandra.apache.org/doc/latest/getting_started/installing.html till and including Step
17 - By the end of this you should have Cassandra working.
18 - Download Apache Zookeeper 3.4.6, install into /opt/app/music and follow these instructions https://zookeeper.apache.org/doc/r3.4.6/zookeeperStarted.html pertaining to the standalone operation. By the end of this you should have Zookeeper working.
19 - Download the Version 8.5 Apache Tomcat and install it using these instructions https://tomcat.apache.org/download-80.cgi (this is for version 8.5).
20 - Create a music.properties file and place it in /opt/app/music/etc/. Here is a sample of the file:
21
22 music.properties::
23
24     music.properties
25     my.id=0
26     all.ids=0
27     my.public.ip=localhost
28     all.public.ips=localhost
29     ########################
30     # Optional current values are defaults
31     ######################################
32     # If using docker this would point to the specific docker name.
33     #zookeeper.host=localhost
34     #cassandra.host=localhost
35     #music.ip=localhost
36  
37     #debug=true
38     #music.rest.ip=localhost
39     #lock.lease.period=6000
40     # Cassandra Login - Do not user cassandra/cassandra
41     cassandra.user=cassandra1
42     cassandra.password=cassandra1
43     # AAF Endpoint
44     #aaf.endpoint.url=<aaf url>
45
46 - Make a dir /opt/app/music/logs MUSIC dir with MUSIC logs will be created in this dir after MUSIC starts.
47 - Build the MUSIC.war and place in tomcat webapps dir. 
48 - Authentications/AAF Setup For Authentication setup.
49 - Start tomcat and you should now have MUSIC running.
50
51 Extra Cassandra information for Authentication:
52
53 To create first user in Cassandra
54
55 1. Edit conf/Cassandra.yaml file::
56
57     authenticator: PasswordAuthenticator
58     authorizer: CassandraAuthorizer
59
60
61 2. Restart Cassandra
62 3. Login to cqlsh with default credentials::
63
64     cqlsh -u cassandra -p cassandra
65
66 4. To change default user create new user with the following command.::
67
68     CREATE USER new_user WITH PASSWORD ‘new_password’ SUPERUSER;
69
70 5. Change password for default user ‘Cassandra’ so that no one will be able to login::
71    
72     ALTER USER cassandra WITH PASSWORD ‘SomeLongRandomStringNoonewillthinkof’;
73
74 6. Provide the new user credentials to Music. Update music.properties file and uncomment or add the following::
75
76     cassandra.user=<new_user>
77     cassandra.password=<new_password>
78
79 To access keyspace through cqlsh, login with credentials that are passed to MUSIC while creating the keyspace.
80
81 Continue with `Authentication <./automation.rst>`_
82
83
84
85