SSL + bg deployment


1) create a production and preproduction app.
  • valentina/ production
  • valentina/preproduction
2) Set up SSL
  • acquire a domain
  • purchase an SSL certificate from a certificate authority, to have:
    • private key: I.E
    • intermediate authority cert: I.E GandiStandardSSLCA.cer
    • domain certificate:I.E
  • concatenate the intermediate and the domain certificate to have a global certificate—> - note that you will probably have to add a new line in your domain certificate before concatenating (as explained here)
    $ cat GandiStandardSSLCA.cer >>
  • validate the certificate:
    bees app:cert:validate -a valentina -cert  -pk
  • create an SSL dedicated router
    $ bees app:router:create -ac valentina -cert  -pk  valentina-router-ssl
  • make your domain point to the router, creating an A record in your DNS manager
  • force the redirect_ssl=true for the production application:
    $ bees app:proxy:update -a valentina/production redirect_ssl=true
  • do the same for your preproduction app:
    $ bees app:proxy:update -a valentina/preproduction redirect_ssl=true
  • force your production and preproduction application to use the SSLdedicated router, using the cloudbees console
  • now if you try to run the production application, an error will show up cause you are not allowed to use ssl on cloudbees domain, you need to set up an ALIAS:
  • set an alias for your production application
    $ bees app:proxy:update -a valentina/production -al
  • check on your cloudbees console that the alias was created
  • try to run your production application:
this is because now your application answers to
  • try to run your production application accessing it should show the welcome page of your production application.
  • create the pair of active/standby application
    $ bees app:bg:config -n production -a1 valentina/production -a2 valentina/preproduction -pal


  • try to switch between the two applications with this command:
     $ bees app:bg:switch -n production
The ALIAS will be moved between the two applications.
Valentina Armenise
Software Engineer

Add new comment