diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-03 14:35:46 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-03 14:35:46 -0300 |
commit | cedac90b22bdd0ff823729b096e961685d5c25c7 (patch) | |
tree | 54214cd344458a6d30743ac431d2bebce281b098 | |
parent | 6117486e7e3c853269872d3cd4a68e791b5250d2 (diff) | |
download | hydra-cedac90b22bdd0ff823729b096e961685d5c25c7.tar.gz hydra-cedac90b22bdd0ff823729b096e961685d5c25c7.tar.bz2 |
Init: generate puppet repository
-rw-r--r-- | TODO.md | 1 | ||||
-rw-r--r-- | lib/hydra/git | 1 | ||||
-rwxr-xr-x | share/hydra/init | 9 | ||||
-rwxr-xr-x | share/hydractl/bootstrap | 11 |
4 files changed, 16 insertions, 6 deletions
@@ -4,6 +4,5 @@ TODO Hydra ----- - - Init: generate puppet repository using "hydractl bootstrap repository" - Uniform syntax for specifying nodes (either by hostname or fqdn) on deploy and import-key. - Provision: wrapper for "hydractl provision" with stores/uses node configuration. diff --git a/lib/hydra/git b/lib/hydra/git index 0908f54..74bdc9a 100644 --- a/lib/hydra/git +++ b/lib/hydra/git @@ -41,6 +41,7 @@ function hydra_git_init { fi ( + echo "Initializing git repo $repo..." cd $repo git init git add . diff --git a/share/hydra/init b/share/hydra/init index 69a0ef5..46c2de6 100755 --- a/share/hydra/init +++ b/share/hydra/init @@ -67,7 +67,16 @@ else fi # Create bootless repository + echo "Initializing bootless repository..." hydra $HYDRA bootless init + + # Create puppet repository + echo "Cloning initial puppet repository..." + git clone git://git.sarava.org/puppet-bootstrap.git $BASEDIR/puppet + + # Config puppet + echo "Configuring puppet repository..." + ( cd $BASEDIR/puppet && make submodules && make config ) fi cat<<-EOF diff --git a/share/hydractl/bootstrap b/share/hydractl/bootstrap index 6658e4e..c83a4b0 100755 --- a/share/hydractl/bootstrap +++ b/share/hydractl/bootstrap @@ -21,14 +21,15 @@ STAGE="$1" if [ "$STAGE" == "repository" ]; then hydractl puppet-install - mkdir -p /etc/puppet/modules - git clone git://git.sarava.org/puppet-bootstrap /etc/puppet/modules/bootstrap + rm -rf /etc/puppet && git clone git://git.sarava.org/puppet-bootstrap /etc/puppet + chown -R puppet. /etc/puppet - echo "Editing /etc/puppet/modules/bootstrap/manifests/config.pp to suit your needs..." + echo "Please edit /etc/puppet/manifests/config.pp to suit your needs..." + echo "Press any key to continue, Ctrl-C to abort..." + read option $EDITOR /etc/puppet/modules/bootstrap/manifests/config.pp fi if [ -e "/etc/puppet/modules/bootstrap/manifests/$stage.pp" ]; then - puppet agent --no-daemonize --debug --verbose --onetime /etc/puppet/modules/bootstrap/manifests/$stage.pp - puppet agent --no-daemonize --debug --verbose + puppet apply /etc/puppet/modules/bootstrap/manifests/$stage.pp fi |