jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Everett Toews (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-446) Script doesn't run
Date Thu, 06 Feb 2014 18:36:10 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13893625#comment-13893625
] 

Everett Toews commented on JCLOUDS-446:
---------------------------------------

I found that in some cases I had to prefix the script with a sleep.

e.g.

{code}
                String script = new ScriptBuilder()
                        .addStatement(exec("sleep 1"))
                        .addStatement(exec("sudo apt-get -q -y update"))
                        .addStatement(exec("sudo apt-get -q -y install apache2"))
                        .addStatement(exec("sudo ufw allow 22"))
                        .addStatement(exec("sudo ufw allow 80"))
                        .addStatement(exec("sudo ufw --force enable"))
                        .addStatement(exec("echo 'Hello World' > /var/www/index.html"))
                        .render(OsFamily.UNIX);
{code}


> Script doesn't run 
> -------------------
>
>                 Key: JCLOUDS-446
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-446
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-compute
>    Affects Versions: 1.7.0, 1.8.0
>            Reporter: Izek Greenfield
>
> Hi,
> i have this script: 
> `rm -rf /etc/puppet/prodpuppet
>         cd /etc/puppet
>         git clone http://10.234.0.72/prodpuppet /etc/puppet/prodpuppet
>         for file in `find /etc/puppet/prodpuppet -iname *.sh`
>         do
>           chmod 700 $file
>         done
>         rm -rf /etc/puppet/chpuppet
>         git clone http://10.234.0.72/chpuppet /etc/puppet/chpuppet
>         for file in `find /etc/puppet/chpuppet -iname *.sh`
>         do
>           chmod 700 $file
>         done
>         cd -
>         echo '
>         class role::scopeBase {
>                require bin_repo::client
>                #require sysstat
>                require set_env
>                #require expect
>                require admin::ssh_disable_host_key_check
>                require admin::augeas
>                require admin::log
>                require admin::ntp
>                require admin::yum
>         }
>                     class role::scope inherits role::scopeBase {
>                           #####################
>                           # hostname izek-as-mongo0
>                           #####################
>         include mongodb_tar
>         include emm
>         }' > /etc/puppet/chpuppet/modules/role/manifests/scope.pp
>         echo '{"rpm::folder":"/opt/nds/rpms","mongodb_tar::version":"2.4.5.1","bin_repo::url":"http://10.234.0.72/dependencies","bin_repo::host":"10.234.0.72","emm::version":"3.51.0-2","bin_repo::dir":"/opt/nds/rpms","install_dir":"/opt/nds/installed/","bin_repo::components::url":"http://10.234.0.72/components"}'
> /etc/puppet/chpuppet/hieradata/role/scope.json
>         chmod 600 /etc/puppet/chpuppet/hieradata/role/scope.json
>         augtool set /files/etc/puppet/puppet.conf/main/environment scope
>         augtool set /files/etc/puppet/puppet.conf/main/modulepath /etc/puppet/modules:/usr/share/puppet/modules:/etc/puppet/prodpuppet/modules:/etc/puppet/chpuppet/modules:/etc/puppet/chpuppet/forge
>         ln -s /etc/puppet/chpuppet/hieradata/hiera.yaml /etc/puppet/hiera.yaml
>         ln -s /etc/puppet/chpuppet/hieradata /etc/hieradata
>         cd /etc/puppet
>         export FACTER_vmrole=scope; export FACTER_fqdn=com; /etc/puppet/chpuppet/provisioning/puppet/puppet_check.sh
role::scope
>         cd -`
> when running from java the git clone do nothing. when log into the machine and run the
script it is OK.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message