Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jupiter 10.5.0 mysql empty host user removal #349

Conversation

kobimichaeli
Copy link
Contributor

@tan-tan-kanarek 1st commit, please review it.

root added 2 commits February 17, 2015 15:44
time: 4h

Added a check with a user menu priore to the Kaltura installation configuration
NO_REMOVAL_NOTICE="This installation has been stopped. In order to try again please tend to stop reason and run '${CYAN}kaltura-config-all.sh${NORMAL}' or '${CYAN}kaltura-db-config.sh${NORMAL}' depending on the initial command which has been used.";

#USed for both connection check, and record check
EMPTY_HOSTS_RECORDS=`mysql -h$MYSQL_HOST -u$MYSQL_SUPER_USER -p$MYSQL_SUPER_USER_PASSWD -P$MYSQL_PORT -N -e "use mysql; select host,user from mysql.user where user=''"`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of 'use mysql', you could add mysql as last argument to the mysql command, but since you use mysql.user, you just don't need it.

@jessp01
Copy link
Contributor

jessp01 commented Feb 20, 2015

@kobimichaeli,

The reason I do not wish to do this for the user is that we are messing with tables that were not created by us, i.e the mysql.user table.
In the guide, we ask to run mysql_secure_installation which removes these lines and is supplied by MySQL package.
Did you run this script before starting the install? if so, we should try to understand why it did not remove these records and the test DB..

Thanks,

@jessp01
Copy link
Contributor

jessp01 commented Feb 25, 2015

@kobimichaeli, can you please reply?

@jessp01
Copy link
Contributor

jessp01 commented Feb 26, 2015

Just so that my discussion with Kobi is documented, here is our mail exchange:

Kobi:
The reason for the change (apart from the fact that I didn’t use the mysql_secure_installation correctly J ) is that there is an
effort to make a fully automated install tool which will receive a premade answer file,

and install a single machine and later a multi-server installation.

We are trying to achieve this goal in order to create an automated testing process which will be able to install and roll back a
snapshot on a set of VM machines without any user intervention.

What I’ve been assigned to do is use your install scripts and install a machine using them. Since (at the moment) there is no
danger of damaging any user DB, there is no danger of performing the removal.

I’ve managed to get around the mysql_secure_installation’s problem of being interactive use only, so there is no need for the
change I’ve made.

I will not proceed with the Kaltura-db-config.sh’s change since there is no current need for it.The reason for the change (apart from the fact that I didn’t use the mysql_secure_installation correctly J ) is that there is an
effort to make a fully automated install tool which will receive a premade answer file,

and install a single machine and later a multi-server installation.

We are trying to achieve this goal in order to create an automated testing process which will be able to install and roll back a
snapshot on a set of VM machines without any user intervention.

What I’ve been assigned to do is use your install scripts and install a machine using them. Since (at the moment) there is no
danger of damaging any user DB, there is no danger of performing the removal.

I’ve managed to get around the mysql_secure_installation’s problem of being interactive use only, so there is no need for the
change I’ve made.

I will not proceed with the Kaltura-db-config.sh’s change since there is no current need for it.

Jess:
This already exists, see:
https://github.com/kaltura/platform-install-packages/tree/Jupiter-10.5.0/vagrant

While it is about vagrant, you can use the same method as here:
https://github.com/kaltura/platform-install-packages/blob/Jupiter-10.5.0/vagrant/kaltura-install.sh
for non vagrant installs as well.

Apart from the MySQL, it is ALL automated with an ans file already, see doc:
https://github.com/kaltura/platform-install-packages/blob/Jupiter-10.5.0/doc/kaltura.template.ans

It has to be this way because we support fully automated deployments using Chef.

I am closing the request but do let me kow if you have more questions

@jessp01 jessp01 closed this Feb 26, 2015
@kobimichaeli kobimichaeli deleted the Jupiter-10.5.0-mysql-empty-host-user-removal branch March 21, 2016 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants