Discussion - Component packages on control machine or remote machine?

Hi guys,

I’d like to open this question for discussion as I am not sure what is the best practice here.

So we are working on deploying our platform. This involves Unix machines and windows machine. Currently we are using Artifactory to store component packages. Component packages are basically Zip files with each package. We are planning in the future to use Nuget and Git for this but for now our packages are Zip files with component already built within them.

Here is the million dollar question, what would you suggest:

  • Download packages to Ansible control machine and deploy them to remote hosts?
  • Download packages straight to remote host and conduct logic there?
    One of the reasons i am asking is due to a complaint from one of the DEVs working on a Unix component deployment. He says “Hey, because you want us to have the package on the remote machine i cannot use simple and useful modules like ‘Copy’”.

So what do you guys think?

If the networking overhead is the same (i.e. it doesn’t cost more to fetch multiple times from artifactory, isn’t slower etc), I think you should download straight on the target hosts. Does Artifactory have an HTTP api? If it does, there’s the get_url module (http://docs.ansible.com/get_url_module.html)

Hi,

I'd recommend the opposite. Question might be for propagation between
different stages. Even if you can verify your download with shasums,
you may want to ensure that the exact same file is available to all
nodes in question.
Assumption may be that there's a snapshot installed on some of the
stages, and the snapshot gets updated in artifactory by CI, you'll
end up having two different artifacts installed. Downloading and
verifying once feels better than downloading and verifying N times.

# kraM

yes it does have http api, we are planning on using it with get_url or win_geturl

thanks for the response, i must admit i am quite new to this, could you please simplify your answer since i am not completely familiar with your meaning of “shasums”, “stages”, “snapshot”.

thanks again

Hi,

stage here means something like development, test or production
instances of your deployment.

shasums here means checksums to validate that your download has
succeeded properly (e.g. md5 /path/to/file or sha256sum /path/to/file).

snaphshot here comes from maven based Java development (my assumpion
was maven/gradle because of artifactory). A snapshot is a development
version of a software which has no release version, which is not tagged,
which may get overridden in artifactory, because it is not a final
version.

Hope this helps for your understanding,

# kraM