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

Where to place scripts #1

Open
whobutsb opened this issue Aug 14, 2012 · 6 comments
Open

Where to place scripts #1

whobutsb opened this issue Aug 14, 2012 · 6 comments

Comments

@whobutsb
Copy link

Hi there, Just wanted to say thank you for releasing this hostmanager packager, I can see it working out really well for maintaining my Beanstalk instances. One question:

After deploying the hostmanager on to my instance where do you place the deploy.sh, startup.sh, etc scripts on your system? Do you create a new directory in /var/ww/html? or is there somewhere in the /opt/elasticbeanstalk directory you place these scripts.

Thank you for the help.

@willkelleher
Copy link

Hi,

Glad you like it!

I'm currently just leaving them where they're extracted when the app is deployed - /tmp/php-elasticbeanstalk...(can't remember exact path). That's where the HostManager app expects them to be when it tries to invoke them.

This probably isn't the best practice, since they would be lost on a reboot when /tmp is cleared, but rebooting an instance shouldn't really happen in this workflow either. I haven't had any problems yet...(knocking on wooden desk).

If this is problematic, we can just decide on a specific directory in which to store the scripts after a deployment.

@whobutsb
Copy link
Author

Thanks for the reply! i'm actually starting to experiment with the
hostmanager and adding in my own hooks for pre-deploy, post-deploy, etc.
And your tool seems to be perfect. I would recommend adding the scripts
maybe in to their own directory maybe somewhere like
/var/www/html/hostmanager or something like that.

I'm still having trouble deploying your code. Would you happen to have any
more instructions on deploying and using your code?

Thanks!
Steve

On Wed, Aug 15, 2012 at 2:32 PM, Will Kelleher [email protected]:

Hi,

Glad you like it!

I'm currently just leaving them where they're extracted when the app is
deployed - /tmp/php-elasticbeanstalk...(can't remember exact path). That's
where the HostManager app expects them to be when it tries to invoke them.

This probably isn't the best practice, since they would be lost on a
reboot when /tmp is cleared, but rebooting an instance shouldn't really
happen in this workflow either. I haven't had any problems yet...(knocking
on wooden desk).

If this is problematic, we can just decide on a specific directory in
which to store the scripts after a deployment.


Reply to this email directly or view it on GitHubhttps://github.com/Nuvixa/hostmanager/issues/1#issuecomment-7768305.


Steve Barbera
[email protected]

@willkelleher
Copy link

Ok, I'll push some changes to move those scripts to a more durable location.

What sort of problems are you having when you try to deploy this? You should just have to:

  1. Launch an EC2 instance with whatever the current PHP AMI is
  2. SSH in to that instance
  3. wget https://github.com/Nuvixa/hostmanager/zipball/master
  4. unzip the file (probably called "master" with no extension)
  5. cd inside the extracted directory
  6. chmod +x deploy.sh
  7. sudo ./deploy.sh will do the rest
  8. From the AWS Console, create a new AMI of this EC2 instance
  9. Change the AMI of your Beanstalk environment to this new AMI you created

If that's not working, please send a detailed description of what you're trying and how it's failing.

@whobutsb
Copy link
Author

Thank you Will. I'll give you directions a try and see how it goes.

Steve

On Wed, Aug 15, 2012 at 2:45 PM, Will Kelleher [email protected]:

Ok, I'll push some changes to move those scripts to a more durable
location.

What sort of problems are you having when you try to deploy this? You
should just have to:

  1. Launch an EC2 instance with whatever the current PHP AMI is
  2. SSH in to that instance
  3. wget a zipball of this package (
    https://github.com/Nuvixa/hostmanager/zipball/master)
  4. unzip the file (probably called "master" with no extension)
  5. cd inside the extracted directory
  6. 'chmod +x deploy.sh'
  7. sudo ./deploy.sh will do the rest

If that's not working, please send a detailed description of what you're
trying and how it's failing.


Reply to this email directly or view it on GitHubhttps://github.com/Nuvixa/hostmanager/issues/1#issuecomment-7768668.


Steve Barbera
[email protected]

@whobutsb
Copy link
Author

Hi Will,

Just to let you know, I followed your instructions on installing the
hostmanager but now whenever I try to push my GIT changes to my environment
I receive these messages in the events log:

Version git-99f9e1bf3cf39c801f2c98fe25c4c5197f86e84c deployment failed. -
The following 1 instance(s) did not deploy: i-xxxxxbe - Still attempting to
deploy version git-99f9e1bf3cf39c801f2c98fe25c4c5197f86e84c.

Do you know of a place where I can see system logs that would lead to why
i'm receiving these error messages?
Also do you know what user the system runs on when it runs these hooks with
hostmanager? Ultimately I have a folder that I would like updated with a
Git Clone command.

Thanks for the help.

On Wed, Aug 15, 2012 at 2:47 PM, Steve Barbera [email protected] wrote:

Thank you Will. I'll give you directions a try and see how it goes.

Steve

On Wed, Aug 15, 2012 at 2:45 PM, Will Kelleher [email protected]:

Ok, I'll push some changes to move those scripts to a more durable
location.

What sort of problems are you having when you try to deploy this? You
should just have to:

  1. Launch an EC2 instance with whatever the current PHP AMI is
  2. SSH in to that instance
  3. wget a zipball of this package (
    https://github.com/Nuvixa/hostmanager/zipball/master)
  4. unzip the file (probably called "master" with no extension)
  5. cd inside the extracted directory
  6. 'chmod +x deploy.sh'
  7. sudo ./deploy.sh will do the rest

If that's not working, please send a detailed description of what you're
trying and how it's failing.


Reply to this email directly or view it on GitHubhttps://github.com/Nuvixa/hostmanager/issues/1#issuecomment-7768668.


Steve Barbera
[email protected]


Steve Barbera
[email protected]

@willkelleher
Copy link

Steve,

Take a look at /opt/elasticbeanstalk/var/log/hostmanager.log - this is where HostManager will display errors.

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

No branches or pull requests

2 participants