Open kraghupathi opened 7 years ago
We prepared a labspec file and automation script for installation of moodle and mediawiki.
And also ran manually these scripts on local machine.
By default the ADS service is taking ubuntu_12.04 template, but we need to run LdD server on CentOS_6.9 template.
We have changed template ubuntu-12.04
to centos-6.9
in base-config.py
and centos-bridged-config.py
files on ADS machine. But its giving following error.
File "src/adapters/adapter_server.py", line 34, in post (success, vm_id) = adapter_instance.create_vm(lab_spec) File "/root/ovpl/src/adapters/centos_bridged_adapter.py", line 170, in create_vm (vm_create_args, vm_set_args) = self.construct_vzctl_args(lab_spec) File "/root/ovpl/src/adapters/centos_bridged_adapter.py", line 420, in construct_vzctl_args config.supported_template) File "/root/ovpl/src/adapters/base_adapter.py", line 123, in find_os_template raise OSNotFound(msg) OSNotFound: u'OS = CENTOS is not supported'
We need development team help to fix the above issue
@kraghupathi we will look into this issue and update as soon as possible.
07/04/2017 08:18:46 AM: ERROR: /root/ovpl/src/vm_pool.py:95 -> VMPool: create_vm(): Error communicating withadapter: VMPool: create_vm(): Error creating VM: {"vm_ip": "10.100.0.67", "vm_port": "9089", "vm_id": "67"} 07/04/2017 08:18:46 AM: ERROR: /root/ovpl/src/controller.py:89 -> test_lab(): Test failed with error: VMPool: create_vm(): Error creating VM: VMPool: create_vm(): Error creating VM: {"vm_ip": "10.100.0.67", "vm_port": "9089", "vm_id": "67"}
We prepared a script for automation of install mysql server with password . The script is available at here
When we installed mysql-5.7.18 version on CentOS-6.9 will getting following error
of setpriority().2017-07-07T08:20:40.555740Z 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!2017-07-07T08:20:40.555799Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error2017-07-07T08:20:41.156243Z 0 [ERROR] Plugin 'InnoDB' init function returned error.2017-07-07T08:20:41.156288Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.2017-07-07T08:20:41.156307Z 0 [ERROR] Failed to initialize plugins.2017-07-07T08:20:41.156323Z 0 [ERROR] Aborting2017-07-07T08:20:41.156341Z 0 [Note] Binlog end2017-07-07T08:20:41.157023Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Its looke like mysql server has been failed
@kraghupathi Refer this link https://stackoverflow.com/questions/34569373/install-mysql-community-server-5-7-via-bash-shell-script-in-centos-7-x64
In place of those commands use our mysql-community-server commands that are there in https://github.com/vlead/vlabs-learn-by-doing/blob/develop/scripts/install.sh ( Install mysql 5 section)
Use the following script as it is ( But change "mysqlRootPass" password )
I tested this script and working
> #!/bin/bash
#mysqlRootPass="$(pwmake 128)"
mysqlRootPass="root123"
echo ' -> Removing previous mysql server installation'
service mysqld stop && yum remove -y mysql-community-server && rm -rf /var/lib/mysql && rm -rf /var/log/mysqld.log && rm -rf /etc/my.cnf
echo ' -> Installing mysql server (community edition)'
yum install wget -y
wget https://dev.mysql.com/get/mysql57-community-release-el6-11.noarch.rpm
yum localinstall mysql57-community-release-el6-11.noarch.rpm -y
yum install mysql-community-server -y
service mysqld start
echo ' -> Starting mysql server (first run)'
chkconfig mysqld on
tempRootDBPass="`grep 'temporary.*root@localhost' /var/log/mysqld.log | tail -n 1 | sed 's/.*root@localhost: //'`"
echo ' -> Setting up new mysql server root password'
service mysqld stop
rm -rf /var/lib/mysql/*logfile*
wget -O /etc/my.cnf "https://my-site.com/downloads/mysql/512MB.cnf"
service mysqld start
mysqladmin -u root --password="$tempRootDBPass" password "$mysqlRootPass"
mysql -u root --password="$mysqlRootPass" -e "
DELETE FROM mysql.user WHERE User='';
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
DELETE FROM mysql.user where user != 'mysql.sys';
CREATE USER 'root'@'%' IDENTIFIED BY '${mysqlRootPass}';
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;"
#EOSQL
service mysqld status
echo " -> MySQL server installation completed, root password: $mysqlRootPass";
Before "Next step is to copy jmoodledata and mediawiki files in above machine."
Replace the URLs https://gitlab.com/vlabs-external-projects/lbd-review-meeting/issues/5
The links are actually coming from mysql database.
Replaced urls with the following steps
We tried to push moodle sources in github. But github takes only 531MB, the total size of moodle is 637MB.
Note: We pushed 637MB into github but when we clone the repository and will getting moodle size is 531MB.
In the automation of LbD server will install only mediawiki and moodle without LbD (mediawiki and moodle) sources on Base4-machine because of the moodle and mediawiki size is 60GB, we cannot push 60GB in github as per above issue, so manually we can copy sources in it.
Having explored moodle and mediawiki here and documentation of steps being done, a labspec of LbD is to be written and must be auto-deploy able.