Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-1839] Trafodion Installer Evolution #807

Merged
merged 4 commits into from
Nov 9, 2016
Merged

[TRAFODION-1839] Trafodion Installer Evolution #807

merged 4 commits into from
Nov 9, 2016

Conversation

mkby
Copy link
Contributor

@mkby mkby commented Nov 1, 2016

new python version installer

@Traf-Jenkins
Copy link

Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1309/

@Traf-Jenkins
Copy link

Copy link
Contributor

@svarnau svarnau left a comment

Choose a reason for hiding this comment

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

I don't understand everything needed in installer, but this is definitely a good start for the re-write. Few minor suggestions.

- /etc/hosts contains hostname info for all Trafodion nodes on **installer node**
- python version 2.6/2.7, and python library `httplib2`, `prettytable`
- Trafodion server package file is stored on **installer node**
- Passwordless SSH login, two ways:
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to clarify that one of these two options is needed, not both.

from ConfigParser import ConfigParser
from collections import defaultdict

__VERSION__ = 'v1.0.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

Hard-coding a version number here is not a good idea. If we need one, it should be generated at time the installer is packaged.

DBCFG_TMP_FILE = INSTALLER_LOC + '/.db_config_temp'

TMP_DIR = '/tmp/.install'
MARK = '[ERR]'
Copy link
Contributor

Choose a reason for hiding this comment

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

.install is a very generic name. It may possibly be used for other things and hence not secured properly, etc.
Maybe something like /tmp/trafodion_install_temp would be better.


def run_cmd_as_user(user, cmd):
return run_cmd('sudo su - %s -c \'%s\'' % (user, cmd))

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably want to use -n (non-interactive) option to sudo, so we never get password prompt, etc.

key_file = '/tmp/id_rsa'
run_cmd('sudo rm -rf %s*' % key_file)
run_cmd('sudo echo -e "y" | ssh-keygen -t rsa -N "" -f %s' % key_file)

Copy link
Contributor

Choose a reason for hiding this comment

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

Use -q option to prevent ssh-keygen from prompting.

from common import run_cmd, cmd_output, err

# not used
EPEL_REPO = """
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not need to be hard-coded. Doing a yum install of "epel-release" package will get you the epel repo file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we only need 'pdsh' dependency from epel repository, so I'm thinking to install 'pdsh' rpm directly, but not use epel repository. Is it acceptable?

Copy link
Contributor

Choose a reason for hiding this comment

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

Directly? I'm not sure what is meant, but I think it is best to install from epel repo.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering the same. Directly seems to imply that we're distributing the pdsh package?

run_cmd('mkdir -p %s' % TRAF_DIR)
run_cmd('tar xf %s -C %s' % (TRAF_PACKAGE_FILE, TRAF_DIR))

print 'Trafodion package uncompressed successfully!'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think "extracted" would make more sense to me than "uncompressed". But opinions may vary.

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1313/

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor

A huge change, need sometime to review it. Is previous installer still work together with this new one? I mean, one can still use the old installer as well this new installer? Or it is a replacement abruptly?

@mkby
Copy link
Contributor Author

mkby commented Nov 3, 2016

The two installer will coexist for a short of time, both of them can be used. Once the new one is stable and acceptable by users, we can remove the old one. There're still features need to be implemented for the new installer, for example, elasticity.

@amandamoran
Copy link
Contributor

+1 to Ming. Would also like a chance to review but if we are not making switch yet that's different.

Copy link
Contributor

@moscowgentalman moscowgentalman left a comment

Choose a reason for hiding this comment

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

looks good to me. +1

@Traf-Jenkins
Copy link

New Check Test Started: https://jenkins.esgyn.com/job/Check-PR-master/1334/

@Traf-Jenkins
Copy link

@moscowgentalman
Copy link
Contributor

is this good to be merged?
I cannot have any comments, would let it be tested.

@asfgit asfgit merged commit ed2f03e into apache:master Nov 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants