Bug 1315635

Summary: [RFE] skyring-setup.sh should be removed from rhscon-core
Product: Red Hat Storage Console Reporter: Martin Kudlej <mkudlej>
Component: coreAssignee: Nishanth Thomas <nthomas>
core sub component: configuration QA Contact: sds-qe-bugs
Status: CLOSED NOTABUG Docs Contact: Anjana Suparna Sriram <asriram>
Severity: unspecified    
Priority: unspecified CC: japplewh, mbukatov, mkudlej, nthomas, sankarshan
Version: 2Keywords: Reopened, TestBlocker
Target Milestone: ---   
Target Release: 2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-24 05:46:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Kudlej 2016-03-08 09:49:49 UTC
Description of problem:
I think skyring-setup.sh should be transformed into documentation: 

$ cat skyring-setup.sh

...

- this should be completely removed, see bug 1298096
   info "Disabling firewalld"
   systemctl stop firewalld && systemctl disable firewalld

- this should be part of documentation
    info "Starting services"
    # Enable and start the salt-master:
    systemctl enable salt-master
    systemctl start salt-master

    # Enable and start MongoDB
    systemctl enable mongod
    systemctl start mongod

...

    info "Creating skyring database"
    # Configuring MongoDB

    mongo <<EOF
    use skyring
    db.leads.findOne()
    show collections
    db.createUser( { "user" : "admin", "pwd": "admin", "roles" : ["readWrite", "dbAdmin", "userAdmin"] })
    show users
    EOF
    
    # Start the skyring server
    systemctl enable skyringd
    systemctl start skyringd

    info "Setup graphite user"
    /usr/lib/python2.7/site-packages/graphite/manage.py syncdb --noinput

    chown apache:apache /var/lib/graphite-web/graphite.db
# service and chkconfig should be chnaged to systemctl
    service carbon-cache start && chkconfig carbon-cache on
    service httpd start && chkconfig httpd on

...


Version-Release number of selected component (if applicable):
rhscon-core-0.0.8-10.el7.x86_64
rhscon-ui-0.0.19-1.el7.noarch
rhscon-ceph-0.0.6-10.el7.x86_64

How reproducible:
100%

Comment 2 Nishanth Thomas 2016-03-10 10:15:50 UTC
Why do you think so? So you expect all these things will be done manually?
What is the problem in providing a script like this to ease the post installation tasks?

Comment 3 Martin Kudlej 2016-03-10 10:49:35 UTC
I think "systemctl" commands should be in documentation as they are for example here https://access.redhat.com/documentation/en/red-hat-ceph-storage/version-1.3/red-hat-ceph-storage-13-installation-guide-for-rhel-x86-64/

Then there are commands for set up internal accounts, for example DB accounts. I think this should be in documentation because admin who installs USM, should be able to set up his own accounts or this. It is not safe to have default accounts in applications.

Comment 4 Nishanth Thomas 2016-03-10 11:06:09 UTC
I agree that "systemctl" commands should be in the documentation. But is it a good idea leave all the post installation tasks to the administrator and he does a bunch things manually to make the USM to work? I don't think so.

Comment 5 Martin Kudlej 2016-03-11 10:10:02 UTC
We've agreed on systemctl commands.

This can be in setup script but user should be to set password for admin(script parameter for example).
    mongo <<EOF
    use skyring
    db.leads.findOne()
    show collections
    db.createUser( { "user" : "admin", "pwd": "admin", "roles" : ["readWrite", "dbAdmin", "userAdmin"] })
    show users
    EOF

I think this can be also in setup script.    
    info "Setup graphite user"
    /usr/lib/python2.7/site-packages/graphite/manage.py syncdb --noinput
    chown apache:apache /var/lib/graphite-web/graphite.db

If you see there left just few lines in setup script so I think they can be in documentation too.

Comment 6 RHEL Program Management 2016-03-22 10:15:53 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.