[campsite-dev] Storing informations
  • Vote Up0Vote Down importimport
    Posts: 0Member
    Hi all,

    I would like to ask about "default storage database" of Campsite Instances in
    2.2
    I know there is none, that all info is in campsite/etc folder, but my idea was
    to make some storage place, so that I can preinitialize create_instance
    script. My idea is following:
    1) Ask about default settings:
    Database IP, starting TCP port, master_campsite_database_name
    2) configure; make; make install

    Now I will use my own scripts
    3) My_create_instance instance_name
    which uses defaults from master_campsite_database and calls create_instance
    with proper parameters
    It should also fill kind of form for that instance to store some important
    informations related to 3rd parties software (ftp_username, ftp_password,
    banner_db......)
    4) I shall have also other scripts like: My_update_all_instances, My_delete
    instance...
    Major feature of these scripts would be generating config files from the
    master_database so that you need not to backup them all the time.

    I would also prefer storing all passwords in this master_campsite_database and
    have them crypted

    So I would like you to think about the form of this master_database and
    recommend me some, so that I do not develop any "to trash" application.
    Note, that it should be possible to easily expand the database to add support
    for various applications used with campsite.

    Ondra

    ------------------------------------------
    Posted to Phorum via PhorumMail
  • 1 Comment sorted by
  • Hi Ondra,

    > I would like to ask about "default storage database" of Campsite Instances in
    > 2.2. I know there is none, that all info is in campsite/etc folder, but my
    > idea was to make some storage place, so that I can preinitialize
    > create_instance script. My idea is following:
    > 1) Ask about default settings:
    > Database IP, starting TCP port, master_campsite_database_name
    > 2) configure; make; make install
    You already have 4 parameters in install_conf.php used as default values when
    creating new instances:
    - apache user
    - apache group
    - SMTP server address
    - SMTP server port

    I added a fifth parameter in CVS version: database server address. There are
    the follwing parameters that don't have yet a configurable default value:

    - database server port
    - database user name
    - database password
    - parser port
    - parser max number of threads

    I would prefer not to add these parameters to the install_conf.php
    configuration file for the following reasons:
    - some of these parameters need changes only in extremely rare cases (database
    server port, parser max number of threads)
    - it would complicate matters for the regular user that installs campsite and
    it would bloat the initial configuration
    - you can't have a default value for parser port: it must be generated
    separately for each instance
    - I would prefer not to save the database password in the world accessible file
    install_conf.php (database_conf.php won't be world accessible starting from
    2.2.3) and the database user usualy goes together with the password

    > Now I will use my own scripts
    > 3) My_create_instance instance_name
    > which uses defaults from master_campsite_database and calls create_instance
    > with proper parameters
    No need to create your own script; with the default values that you are able to
    define at install time you should be ok. You'll need to define a separate
    database user/password for each instance anyway. The parser port is generated
    automaticaly or reused from the old instance. SMTP server address and port are
    read from the default values.

    > It should also fill kind of form for that instance to store some important
    > informations related to 3rd parties software (ftp_username, ftp_password,
    > banner_db......)
    Yes, for third party software you'll have to create your own script.

    > 4) I shall have also other scripts like: My_update_all_instances, My_delete
    > instance...
    You will not need My_update_all_instances: starting with 2.2.3 campsite will
    automatically update all existing instances when running 'make install'.

    > I would also prefer storing all passwords in this master_campsite_database
    > and have them crypted
    It would require quite a lot of work to make campsite be able to read from
    encrypted files and I don't think it's worth it for the following reasons:
    - in order to read those passwords you MUST be able to log in to the server
    - the database_conf.php file is only readable by root and apache user; nobody
    else can read this file
    - if properly configured MySQL server will accept connections only from the
    server running Campsite, nobody else will be able to connect

    Mugur




    __________________________________
    Do you Yahoo!?
    Yahoo! Mail - Helps protect you from nasty viruses.
    http://promotions.yahoo.com/new_mail

    ------------------------------------------
    Posted to Phorum via PhorumMail