Live data from Hacker News

How We Deploy Python Code

nylas.com

121–129 of 129 posts

Re: How We Deploy Python Code

#122

"Distributing Docker images within a private network also requires a separate service which we would need to configure, test, and maintain." What does this mean? Setting up a private docker registry is trivial at best and having it deploy on remote servers via chef, puppet; hell even fabric should do the job.

It's not necessarily true either; it's not difficult to have your continuous build process build images from the Dockerfile, run tests, swap green and blue, etc...

Re: How We Deploy Python Code

#123
post #57

Earlier quoted context omitted.

I have to do this everytime I have to deploy, which is similar to having to create a deb package everytime Nylas has to deploy. There are no git dependencies in the process I describe above. The pip drawback that is discussed in the post is of PyPi going down. In the process described above there is no PyPi dependency. Storing the .tar.gz package in a central location is similar to Nylas storing their deb package on…

Are you using a venv?

Nope.

Re: How We Deploy Python Code

#124
post #13

We fixed that issue at Datadog by using Chef Omnibus: https://www.datadoghq.com/blog/new-datadog-agent-omnibus-tic... It's more complicated than the proposed solution by nylas but ultimately it gives you full control of the whole environment and ensure that you won't hit ANY dependency issue when shipping your code to weird systems.

At GitLab we use Chef Omnibus too and we love it. More than 100k organizations use GitLab with Omnibus and it has lowered our support effort enormously. https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/REA...

Re: How We Deploy Python Code

#125

Here's how I deploy python code: cf push some-python-app So far it's worked pretty well. Works for Ruby, Java, Node, PHP and Go as well.

That's interesting. I've tried to google cf CLI however wasn't able to find good documentation. Is it possible to install cf CLI on my server? Or is it Cloud Foundry tool only?

Re: How We Deploy Python Code

#126

Here's how I deploy python code: cf push some-python-app So far it's worked pretty well. Works for Ruby, Java, Node, PHP and Go as well.

That's interesting. I've tried to google cf CLI however wasn't able to find good documentation. Is it possible to install cf CLI on my server? Or is it Cloud Foundry tool only?

The cf CLI tool interacts with a Cloud Foundry installation.

You'd use it for one in your own data centre, or Pivotal Web Services[0], or BlueMix. You point it at an API and login, then off you go.

If you need something more cut-down to play with, Lattice[1] is nifty, but currently doesn't do buildpack magic.

[0] https://run.pivotal.io/ [1] http://lattice.cf/

Re: How We Deploy Python Code

#127
post #45

Here is the process I use for smallish services - 1. Create a python package using setup.py 2. Upload the resulting .tar.gz file to a central location 3. Download to prod nodes and run pip3 install .tar.gz Rolling back is pretty simple - pip3 uninstall the current version and re-install the old version. Any gotchas with this process?

If you are using it for small services it's probably fine. But the original article did say that uninstall sometimes doesn't work correctly. Apt is more formal than pip.

So at some point, as you know you'll need to move on.

Re: How We Deploy Python Code

#129

Earlier quoted context omitted.

sudo apt-get install linux-generic-lts-quantal Easy to upgrade.

If you can, it's easy. I wish everyone to work in environments where it's that simple ;)

Kernel interface change is low on purpose. Test it first with additional vms before throwing up your hands and exclaiming it can't be done, you might be surprised.
Post reply on HN