Getting started with http-kit & nginx on EC2

345 views
Skip to first unread message

Matthew Chadwick

unread,
Apr 28, 2013, 12:15:09 AM4/28/13
to palle...@googlegroups.com
Hi, I'm new to Pallet and I'm a bit lost. I have a server program written with http-kit which I would like to run on EC2 with nginx. I have got as far as having instances run using Pallet 0.8.0-SNAPSHOT, and the example given at https://github.com/rstradling/nginx-crate using [org.clojars.strad/nginx-crate "0.8.0"]. But, how do deploy my http-kit server app to the instance and make it run ?

Ryan Stradling

unread,
Apr 28, 2013, 11:53:00 AM4/28/13
to palle...@googlegroups.com
There a a few ways you could accomplish this.  The general flow that I would recommend is
* Create a new phase for your app called :configure (or deploy).
* Define a defplan for the configure/deploy.
** In this defplan tar or rsync the directory over.
** In this defplan restart the app "service"

This method also assumes you have created an upstart or init.d or what have you script for your application and that you have installed lein/java on your machine.  The upstart script install can go either in the configure or the install phase depending on what you want to do.

Below is some snippet of code that shows the configure flow.  I apologize in advance if the code is missing too much information as I hacked out the parts that were specific to my situation and outside the bounds of this question.  I hope my surgery worked correctly :). In any case, hopefully this gives you an idea of what I am doing and is helpful.


(crate/defplan deploy-app
  "Will deploy the app code from a src-directory onto the server.  Please note
   that app-src-dir must be passed in a {:app {:app-src-dir <dir>}}
   environment variable.  Also, it can take a {:app {:version <version-string>}}
   in the environment as well.  Otherwise it defaults to 1.0"
  [& {:keys [instance-id]}]
  (let [settings (crate/get-settings :app {:instance-id instance-id
                                                 :default ::no-settings})
        {:keys [environment app-dest-dir owner
                group version]} settings
        app-src-dir (env/get-environment [:app :app-src-dir])
        version (env/get-environment [:app :version])
        _ (when-not app-src-dir (throw (IllegalArgumentException.
                                              "Need to pass in the app-src-dir in the env")))
        version-dir (create-version-dir app-dest-dir version)
        chown-str (str "-R " owner ":" group " " version-dir)
        current-dir (create-current-dir app-dest-dir)
        sym-link-cmd (str "-h " owner ":" group " " current-dir)
        ]
    (actions/directory version-dir :path true :owner owner :group group)
    ;; Copy files to the home directory
    (myactions/my-rsync app-src-dir version-dir
                              #{:archive :compress :verbose :delete}
                    {:sudo? true
                     :exclude [".git" "doc" "docs" "target" "checkouts" 
                               "logs" "test" "test-resources"
                               "resources/public/app"
                                 "*.DS_Store"
                               ]})
    (actions/exec-checked-script "Chown the version directory"
          ("chown" ~chown-str))
    (actions/symbolic-link version-dir current-dir :action :create 
                           :owner owner :group group)
    (actions/exec-checked-script "Chown the symbolic link"
                                 ("chown" ~sym-link-cmd))
      (actions/service "app" :action :restart :service-impl :upstart)))

  (defn app
    [settings]
    "Returns a service spec for installing app.  The phases are :settings,
    :configure (sets-up leiningen), and deploy"
    (api/server-spec :phases {:settings (api/plan-fn (app-settings settings))
                              :install (api/plan-fn (install-app))
                              :configure (api/plan-fn
                                           (deploy-app))}))




On Apr 28, 2013, at 12:15 AM, Matthew Chadwick <math...@gmail.com> wrote:

Hi, I'm new to Pallet and I'm a bit lost. I have a server program written with http-kit which I would like to run on EC2 with nginx. I have got as far as having instances run using Pallet 0.8.0-SNAPSHOT, and the example given at https://github.com/rstradling/nginx-crate using [org.clojars.strad/nginx-crate "0.8.0"]. But, how do deploy my http-kit server app to the instance and make it run ?

--
You received this message because you are subscribed to the Google Groups "pallet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pallet-clj+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Hugo Duncan

unread,
Apr 28, 2013, 12:53:03 PM4/28/13
to palle...@googlegroups.com

Hi Mathew,

Matthew Chadwick <math...@gmail.com> writes:

> But, how do deploy my http-kit server app to the instance and make it run ?

Just to follow up on the comments by pyr on irc, we have recently
started an app-deploy crate [1], together with an example of using it
[2]. This hasn't seen extensive use yet, so if you give it a try, we
would grateful for any feed.

Hugo

[1] https://github.com/pallet/app-deploy-crate
[2] https://github.com/pallet/example-deploy-webapp

Matthew Chadwick

unread,
Apr 29, 2013, 6:28:38 AM4/29/13
to palle...@googlegroups.com

thanks to pyr I got my app to upload and run with a (defplan (remote-file... (upstart/job... in the configure phase.

I'll give the app-deploy crate a go...

cheers,

Matthew Chadwick

unread,
May 2, 2013, 6:53:37 AM5/2/13
to palle...@googlegroups.com
hi, although pallet's log messages indicate that it ran my clojure program and nginx, when I later do ps -e on the instance I don't see nginx or java, and I don't see my site when I visit the instance's public ip in my browser. How can I confirm nginx and my program are running ?

Hugo Duncan

unread,
May 2, 2013, 8:01:21 AM5/2/13
to palle...@googlegroups.com

Hi Matthew,

Matthew Chadwick <math...@gmail.com> writes:

> hi, although pallet's log messages indicate that it ran my clojure program
> and nginx, when I later do ps -e on the instance I don't see nginx or java,
> and I don't see my site when I visit the instance's public ip in my
> browser. How can I confirm nginx and my program are running ?

Maybe you could provide some details on how you are starting the
processes with pallet.

I suspect the issue might be caused with the processes not detaching
from the parent process in time, but that is pure conjecture.

Hugo

Matthew Chadwick

unread,
May 2, 2013, 6:20:21 PM5/2/13
to palle...@googlegroups.com
Here's my code

from the REPL I (start-instances) and:

20:11:56.035 [operate-757] INFO  pallet.ssh.execute - 54.252.164.101 site: pallet.actions/directory
20:11:56.411 [operate-757] INFO  pallet.execute - 54.252.164.101 #> site: Directory /etc/nginx/sites-available : SUCCESS
20:11:56.528 [operate-757] INFO  pallet.ssh.execute - 54.252.164.101 site: pallet.actions/directory
20:11:56.813 [operate-757] INFO  pallet.execute - 54.252.164.101 #> site: Directory /etc/nginx/sites-enabled : SUCCESS
20:11:56.938 [operate-757] INFO  pallet.ssh.execute - 54.252.164.101 site: pallet.actions-impl/remote-file-action
20:11:57.243 [operate-757] INFO  pallet.execute - 54.252.164.101 #> site: remote-file /etc/nginx/sites-enabled/default.site : SUCCESS
20:11:57.360 [operate-757] INFO  pallet.ssh.execute - 54.252.164.101 site: pallet.actions/file
20:11:57.671 [operate-757] INFO  pallet.execute - 54.252.164.101 #> site: delete file /etc/nginx/sites-available/default.site : SUCCESS
20:11:58.162 [operate-757] INFO  pallet.ssh.execute - 54.252.164.101:/var/lib/pallet/admin-home/me/server-1.0-standalone.jar.new is already up to date
20:11:58.173 [operate-757] INFO  pallet.ssh.execute - 54.252.164.101 start-server: pallet.actions-impl/remote-file-action
20:11:58.601 [operate-757] INFO  pallet.execute - 54.252.164.101 #> start-server: remote-file server-1.0-standalone.jar : SUCCESS

- and then I do (check-instances with a (defplan (actions/exec-script* "ps -e" - i see processes, but no java or nginx

Ryan Stradling

unread,
May 2, 2013, 7:08:02 PM5/2/13
to palle...@googlegroups.com

Have you tried the following?

Sshing to the machine and starting the nginx service?

If that works is your code calling nginx-restart phase or what have you to restart the nginx service.  By default the nginx service is not started for you I don't believe.

On the actual app, have you tried running the command java * from the command line to make sure that works?

--

Matthew Chadwick

unread,
May 5, 2013, 5:33:46 AM5/5/13
to palle...@googlegroups.com


On Friday, May 3, 2013 9:08:02 AM UTC+10, rstradling wrote:

Have you tried the following?

Sshing to the machine and starting the nginx service?


I couldn't work out how to ssh into the instance (what user am I ? where are the keys ?), but I used exec-script* in the repl (having run my code to create the instance, which does show varioud nginx-related log messages), and when I go

which nginx

- nothing - so I tried

service nginx start

- nginx: unrecognized service

but, if I do ls /etc/nginx there's

sites-available  sites-enabled

I have another question - how do I install Java the pallet way ?

I've been installing it manually using exec-script*
 

If that works is your code calling nginx-restart phase or what have you to restart the nginx service.  By default the nginx service is not started for you I don't believe.


Ahah - how do I do that ?

Matthew Chadwick

unread,
May 5, 2013, 6:06:42 AM5/5/13
to palle...@googlegroups.com
ok having done

(defplan start-nginx [] (actions/service "nginx" :action :start))

(pallet.core/converge
    (pallet.core/group-spec "mygroup"
      :extends [(pallet.crate.nginx/nginx (http-server-config))]
      :count 1
      :node-spec
        (pallet.core/node-spec
          :image {:os-family :ubuntu :image-id "ap-southeast-2/ami-ef7ee9d5"})
      :phases
        {
          :bootstrap automated-admin-user
          :configure start-nginx
        }
    )
    :compute (pallet.configure/compute-service :aws)
  )

but I get:

[:out "start nginx\npalletLyl1c: line 6: /etc/init.d/nginx: No such file or directory\n"] in the results

Ryan Stradling

unread,
May 5, 2013, 12:08:03 PM5/5/13
to palle...@googlegroups.com
Hey Matthew,
Here are some answers to your questions…
Java?
Use the java crate.  https://github.com/pallet/java-crate 

By default your ssh key should be id_rsa.pub (I *believe*).  Your default user will be the username you are logged into your host machine with.

Regarding /etc/init.d/nginx I am not exactly sure off hand what the problem is as it has worked fine for me.  I would suggest to look if you have a nginx file anywhere (specifically in /etc/init.d).  I can help you debug through it more most likely tomorrow by using your code and seeing what I get.  I was hoping to use VirtualBox for testing this but by my earlier e-mail to this list you can tell that is causing me issues right now :).

Thanks,
Ryan



Ryan Stradling

unread,
May 5, 2013, 1:54:15 PM5/5/13
to palle...@googlegroups.com
For now ssh-add -D to delete all keys in my ssh-agent seems to make things work.

Thanks,
Ryan

Ryan Stradling

unread,
May 5, 2013, 2:47:52 PM5/5/13
to palle...@googlegroups.com
Uhhhhh….sorry.   This ssh-add -D was meant to be sent to the other e-mail.  epic fail.

Anyways,
(defn ubuntu-group
  []
  (group-spec "ubuntu-vms"
              :node-spec {:image {:image-id "ubuntu-12.04"}}
              :extends [with-automated
                        (nginx http-server-config)
                        ]))

(pallet.core/converge {(ubuntu-group) 1} :compute vmfest
                      :phase [:bootstrap :install :configure :nginx-restart]
                      )

Seems to work fine for me.   Please note the phase definition.

Thanks,
Ryan

Matthew Chadwick

unread,
May 6, 2013, 7:18:11 AM5/6/13
to palle...@googlegroups.com
cheers,

I tried copying your config:

(defn make-instances []
  (pallet.core/converge
    (pallet.core/group-spec "g0"
      :extends [with-automated-admin-user (pallet.crate.nginx/nginx (http-server-config))]

      :count 1
      :node-spec
        (pallet.core/node-spec
          :image {:os-family :ubuntu :image-id "ap-southeast-2/ami-ef7ee9d5"})
      :phase
        [
          :bootstrap :install
          :configure :nginx-restart
        ]
    )
    :compute (pallet.configure/compute-service :aws)
  )
)

then having successfully run that I tried looking around:

ls /usr/local/sbin/nginx
"ls: cannot access /usr/local/sbin/nginx: No such file or directory\n"

ls /opt/nginx"
"ls: cannot access /opt/nginx: No such file or directory\n"

nothing in /var/log/nginx & nothing nginx related under /etc/init.d either, but:

ls /etc/nginx
sites-available  sites-enabled


Here are the messages I get when I create the instance:

20:54:41.742 [operate-109] WARN  jclouds.compute - to avoid creating temporary keys in aws-ec2, use templateOption overrideLoginCredentialWith(id_rsa)
20:55:18.780 [user thread 4] INFO  n.schmizz.sshj.common.SecurityUtils - BouncyCastle registration succeeded
20:55:18.851 [user thread 4] WARN  net.schmizz.sshj.DefaultConfig - Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy
20:55:20.222 [user thread 4] INFO  n.s.sshj.transport.TransportImpl - Client identity string: SSH-2.0-SSHJ_0_8_1_SNAPSHOT
20:55:20.431 [user thread 4] INFO  n.s.sshj.transport.TransportImpl - Server identity string: SSH-2.0-OpenSSH_6.0p1 Debian-3ubuntu1
20:55:27.228 [user thread 4] INFO  n.s.s.c.c.direct.SessionChannel - Will request `sftp` subsystem
20:55:29.933 [user thread 4] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `chmod 755 /tmp/init-bootstrap`
20:55:32.430 [user thread 4] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `ln -fs /tmp/init-bootstrap bootstrap`
20:55:33.405 [user thread 4] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `/tmp/init-bootstrap init`
20:55:35.355 [user thread 4] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `sudo /tmp/init-bootstrap start`
20:55:38.394 [user thread 5] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `/tmp/init-bootstrap status`
20:55:40.764 [user thread 5] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `/tmp/init-bootstrap stdout`
20:55:42.799 [user thread 5] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `/tmp/init-bootstrap stderr`
20:55:43.359 [user thread 5] INFO  n.s.s.c.c.direct.SessionChannel - Will request to exec `/tmp/init-bootstrap exitstatus`
20:55:43.872 [user thread 4] INFO  n.s.sshj.transport.TransportImpl - Disconnected - BY_APPLICATION
20:55:46.265 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28  pallet.actions/package-manager
20:56:09.777 [operate-201] INFO  pallet.execute - 54.252.166.28 #> package-manager update  : SUCCESS
20:56:12.242 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 [automated-admin-user: install]: pallet.actions/package
20:56:22.768 [operate-201] INFO  pallet.execute - 54.252.166.28 #> [automated-admin-user: install]: Packages : SUCCESS
20:56:24.557 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 [automated-admin-user]: pallet.actions/user
20:56:27.288 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 automated-admin-user: authorize-user-key: authorize-key: pallet.actions/directory
20:56:32.272 [operate-201] INFO  pallet.execute - 54.252.166.28 #> automated-admin-user: authorize-user-key: authorize-key: Directory $(getent passwd onto | cut -d: -f6)/.ssh/ : SUCCESS
20:56:32.871 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 automated-admin-user: authorize-user-key: authorize-key: pallet.actions/file
20:56:37.250 [operate-201] INFO  pallet.execute - 54.252.166.28 #> automated-admin-user: authorize-user-key: authorize-key: file $(getent passwd onto | cut -d: -f6)/.ssh/authorized_keys : SUCCESS
20:56:37.782 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 automated-admin-user: authorize-user-key: authorize-key: pallet.actions/exec-script*
20:56:45.086 [operate-201] INFO  pallet.execute - 54.252.166.28 #> automated-admin-user: authorize-user-key: authorize-key authorize-key on user onto (ssh_key.clj:27) : SUCCESS
20:56:46.018 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 automated-admin-user: authorize-user-key: authorize-key: pallet.actions/exec-script*
20:56:49.888 [operate-201] INFO  pallet.execute - 54.252.166.28 #> automated-admin-user: authorize-user-key: authorize-key Set selinux permissions (ssh_key.clj:32) : SUCCESS
20:56:50.456 [operate-201] INFO  pallet.ssh.execute - 54.252.166.28 automated-admin-user: sudoers: pallet.actions-impl/remote-file-action
20:56:54.302 [operate-201] INFO  pallet.execute - 54.252.166.28 #> automated-admin-user: sudoers: remote-file /etc/sudoers : SUCCESS
20:57:21.071 [operate-207] INFO  pallet.ssh.execute - 54.252.166.28 site: pallet.actions/directory
20:57:29.650 [operate-207] INFO  pallet.execute - 54.252.166.28 #> site: Directory /etc/nginx/sites-available : SUCCESS
20:57:30.207 [operate-207] INFO  pallet.ssh.execute - 54.252.166.28 site: pallet.actions/directory
20:57:34.528 [operate-207] INFO  pallet.execute - 54.252.166.28 #> site: Directory /etc/nginx/sites-enabled : SUCCESS
20:57:36.838 [operate-207] INFO  pallet.ssh.execute - 54.252.166.28 site: pallet.actions-impl/remote-file-action
20:57:43.244 [operate-207] INFO  pallet.execute - 54.252.166.28 #> site: remote-file /etc/nginx/sites-enabled/default.site : SUCCESS
20:57:43.821 [operate-207] INFO  pallet.ssh.execute - 54.252.166.28 site: pallet.actions/file
20:57:47.675 [operate-207] INFO  pallet.execute - 54.252.166.28 #> site: delete file /etc/nginx/sites-available/default.site : SUCCESS

btw why is it :phase with a vector, not :phases with a map ?

Ryan Stradling

unread,
May 6, 2013, 8:56:45 AM5/6/13
to palle...@googlegroups.com

I do not see that the install phase is being run given your log.  That would explain what you are seeing as a result pretty well.  I noticed in your old phase definition you did not have  install defined.  I *believe* 0.8 pallet does not run the install phase by default anymore.

In any case, is there any chance you did not reload things before running?  It might be good to start the repl from scratch to make sure. 

Ryan Stradling

unread,
May 6, 2013, 10:56:01 AM5/6/13
to palle...@googlegroups.com
Also here is the full code, (please ignore the horrible requires…it was just done as a quick test…)

(ns pallet.crate.ruby-test )

;;  TESTING for debugging purposes
;;
;;
(require '[pallet.configure :refer [compute-service]
           ])
(require '[pallet.compute :refer [images] ])
(require '[pallet.core :refer [group-spec]])
(require '[pallet.crate.automated-admin-user :as auser])
(require '[pallet.api :as api])
(require '[clojure.tools.logging :as log])
(require '[pallet.crate.nginx :refer [nginx]])
(def vmfest (compute-service "vmfest" nil nil))

(def with-automated
  (api/server-spec :phases {:bootstrap 
                            (api/plan-fn (auser/automated-admin-user))
                            }))

(def http-server-config
  {:sites [{:action :enable
    :name "default.site"
    :upstreams [{:lines [{:server "127.0.0.1:8080"}
                         {:keepalive 32}]
                 :name "http_backend"}]
    :servers [
              {:access-log ["/var/log/nginx/app.access.log"] 
               :locations [{:path "/"
                           :proxy-pass "http://http_backend"
                           :proxy-http-version "1.1"
                           :proxy-set-header [{:Connection "\"\""},
                                              {:X-Forwarded-For 
                                               "$proxy_add_x_forwarded_for"}, 
                                               {:Host "$http_host"}]}]}
              ]}]})

(defn ubuntu-group
  []
  (group-spec "ubuntu-vms"
              :node-spec {:image {:image-id "ubuntu-12.04"}}
              :extends [with-automated
                        (nginx http-server-config)
                        ]))

(pallet.core/converge {(ubuntu-group) 1} :compute vmfest
                      :phase [:bootstrap :install :configure :nginx-restart])

Generates
10:54:07.676 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 [install-nginx]: pallet.actions/package
10:54:08.462 [operate-65] INFO  pallet.execute - 192.168.56.112 #> [install-nginx]: Packages : SUCCESS
10:54:08.627 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 [install-nginx]: pallet.actions/user
10:54:09.044 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions/directory
10:54:09.305 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: Directory /opt/nginx : SUCCESS
10:54:09.485 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions-impl/remote-directory-action
10:54:09.743 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: Directory /opt/nginx : SUCCESS
10:54:09.743 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: remote-file ${TMPDIR-/tmp}/nginx-1.2.6.tar.gz : SUCCESS
10:54:09.744 [operate-65] INFO  pallet.execute - 192.168.56.112 #> Untar ${TMPDIR-/tmp}/nginx-1.2.6.tar.gz : SUCCESS
10:54:09.744 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: Directory /opt/nginx : SUCCESS
10:54:09.744 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: remote-directory : SUCCESS
10:54:09.906 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions/exec-script*
10:54:35.297 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx Build nginx (nginx.clj:229) : SUCCESS
10:54:35.485 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions-impl/remote-file-action
10:54:35.752 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: remote-file /etc/nginx/nginx.conf : SUCCESS
10:54:35.910 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions/directory
10:54:36.167 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: Directory /etc/nginx/conf.d : SUCCESS
10:54:36.332 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions/directory
10:54:36.586 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: Directory /var/run/nginx : SUCCESS
10:54:36.756 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 install-nginx: pallet.actions/file
10:54:37.016 [operate-65] INFO  pallet.execute - 192.168.56.112 #> install-nginx: delete file /etc/nginx/sites-enabled/default : SUCCESS
10:54:37.211 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 init: init-script: pallet.actions-impl/remote-file-action
10:54:37.489 [operate-65] INFO  pallet.execute - 192.168.56.112 #> init: init-script: remote-file /etc/init.d/nginx : SUCCESS
10:54:37.647 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 init: pallet.actions/service
10:54:37.910 [operate-65] INFO  pallet.execute - 192.168.56.112 #> Configure service nginx : SUCCESS
10:54:38.094 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 mime: pallet.actions-impl/remote-file-action
10:54:38.361 [operate-65] INFO  pallet.execute - 192.168.56.112 #> mime: remote-file /etc/nginx/mime.types : SUCCESS
10:54:38.519 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 mime: pallet.actions/file
10:54:38.777 [operate-65] INFO  pallet.execute - 192.168.56.112 #> mime: delete file /etc/nginx/mime.types.default : SUCCESS
10:54:39.001 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 site: pallet.actions/directory
10:54:39.255 [operate-65] INFO  pallet.execute - 192.168.56.112 #> site: Directory /etc/nginx/sites-available : SUCCESS
10:54:39.424 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 site: pallet.actions/directory
10:54:39.680 [operate-65] INFO  pallet.execute - 192.168.56.112 #> site: Directory /etc/nginx/sites-enabled : SUCCESS
10:54:39.844 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 site: pallet.actions-impl/remote-file-action
10:54:40.107 [operate-65] INFO  pallet.execute - 192.168.56.112 #> site: remote-file /etc/nginx/sites-enabled/default.site : SUCCESS
10:54:40.275 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112 site: pallet.actions/file
10:54:40.536 [operate-65] INFO  pallet.execute - 192.168.56.112 #> site: delete file /etc/nginx/sites-available/default.site : SUCCESS
10:54:40.767 [operate-65] INFO  pallet.ssh.execute - 192.168.56.112  pallet.actions/service

Matthew Chadwick

unread,
May 6, 2013, 11:13:47 PM5/6/13
to palle...@googlegroups.com
ahah the difference was that you were doing (converge {(group) 1} :phase [] ) whereas I was doing (converge (group-spec :phase [...

Now it starts the install phase, but I get a bunch of 403s like:

http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.1-4ubuntu5.5_amd64.deb  403  Forbidden

Hugo Duncan

unread,
May 6, 2013, 11:28:30 PM5/6/13
to palle...@googlegroups.com
That's usually a sign that you need to update the package manager -
(p.actions/package-manager :update)

Hugo

Matthew Chadwick

unread,
May 6, 2013, 11:57:53 PM5/6/13
to palle...@googlegroups.com
it works now, after adding java/server-spec to my :extends...

Matthew Chadwick

unread,
May 7, 2013, 12:14:03 AM5/7/13
to palle...@googlegroups.com
big props to you guys for this code btw - extreeeemely useful

Matthew Chadwick

unread,
May 7, 2013, 1:10:49 AM5/7/13
to palle...@googlegroups.com
if I want my instance to be publicly accessible, presumably I need to change the nginx config to take a public IP address, and with EC2 I believe that has to be an elastic IP, so what's the best way to configure that automatically ?
Reply all
Reply to author
Forward
0 new messages