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

Installation script for db setup (fg-metric-install) #110

Open
lee212 opened this issue Mar 23, 2013 · 2 comments
Open

Installation script for db setup (fg-metric-install) #110

lee212 opened this issue Mar 23, 2013 · 2 comments

Comments

@lee212
Copy link
Contributor

lee212 commented Mar 23, 2013

Installation script would help to initialize MySQL database and a futuregrid.cfg configuration file.

$ fg-metric-install
==========================================
Installing Cloud Metrics ...
==========================================

If you have installed mysql database for Cloud Metrics,
you will be asked to type the database information.

---------------------------------------------------
mysql database info
---------------------------------------------------
1. db host ip address: <type ip address>
2. db port (default: 3306): <type port number or enter>
3. db username: <type username>
4. db password: <type password>
5. db name: <type dbname>

... creating $HOME/.futuregrid/futuregrid.cfg file ...
... database information successfully saved. ...

----------------------------------------------------
MySQL table creation
----------------------------------------------------
... creating MySQL tables for Cloud Metrics ...
... instance table created ...
... userinfo table created ...
... projectinfo table created ...
... cloudplatform table created ...

MySQL database setup successfully done.

Q1. When does this script need?
At the first time use of Cloud Metrics, you need setup database information.
Once you installed Cloud Metrics using pip install futuregrid-cloud-metric, you can setup database by fg-metric-install shell executable.

Q2. Why is this step required?
Cloud Metric supports cloud usage analysis based on the data on database. You can not perform any analysis and get statistics without configuring database information.

@laszewsk
Copy link
Member

what about just do the configuration in a yaml file and excluding the passwd that is than asked for.

e.g. -f config.yaml

cloud-metric:

database:
host: ...
port: ...
username: ....
password: input
name: ...

note i put input as password which would result in prompting it . maybe same can applied with other fields.

maybe -o specifies where to store the output file ...

On Mar 23, 2013, at 5:04 PM, lee212 [email protected] wrote:

Installation script would help to initialize MySQL database and a futuregrid.cfg configuration file.

$ fg-metric-install

Installing Cloud Metrics ...

If you have installed mysql database for Cloud Metrics,
you will be asked to type the database information.


mysql database info

  1. db host ip address:
  2. db port (default: 3306):
  3. db username:
  4. db password:
  5. db name:

... creating $HOME/.futuregrid/futuregrid.cfg file ...
... database information successfully saved. ...


MySQL table creation

... creating MySQL tables for Cloud Metrics ...
... instance table created ...
... userinfo table created ...
... projectinfo table created ...
... cloudplatform table created ...

MySQL database setup successfully done.
Q1. When does this script need?
At the first time use of Cloud Metrics, you need setup database information.
Once you installed Cloud Metrics using pip install futuregrid-cloud-metric, you can setup database by fg-metric-install shell executable.

Q2. Why is this step required?
Cloud Metric supports cloud usage analysis based on the data on database. You can not perform any analysis and get statistics without configuring database information.


Reply to this email directly or view it on GitHub.

@lee212
Copy link
Contributor Author

lee212 commented Mar 24, 2013

getpass.getpass() prompts the user for a password without echoing.
http://docs.python.org/2/library/getpass.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants