Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mr. Crow
May 22, 2008

Snap City mayor for life
Are there any good books that go over good patterns and practices re: devops?

I saw this book earlier, anything else noteworthy?

Adbot
ADBOT LOVES YOU

Mr. Crow
May 22, 2008

Snap City mayor for life
On Docker chat; do y'all use the build server to push out new updates for docker images or some other mechanism?

Currently have this suit of bash scripts to handle building and pushing images to our private repository but I'm not really sold on it and there is not a lot of info online beyond 'use dockerhub'. It kind of seems superfluous to be using the build server to do it (at least with our 'infrastructure' and 'base' images that our app images are based on); as I usually end up needing to do it by hand anyway to test that I didn't break anything.

Mr. Crow
May 22, 2008

Snap City mayor for life
I assume you're talking about docker for Windows specifically because the Linux version is very stable...?

Mr. Crow
May 22, 2008

Snap City mayor for life
Just going to plug this, The DevOps 2.0 Toolkit: Automating the Continuous Deployment Pipeline with Containerized Microservices https://www.amazon.com/dp/152391744X/ref=cm_sw_r_cp_apa_LBNbybJWVDACY, is a pretty good book, it covers a lot from the whole CI/CD cycle and ties it all together in a way that's hard to find anywhere online and has tons of examples.

It's also pretty up-to-date from my experience, excellent for people getting their feet wet and probably has some tips or tricks for a more established organization.

Mr. Crow
May 22, 2008

Snap City mayor for life
Anyone have experience setting up teamcity in a docker container behind a reverse proxy which is also in a container (nginx)?

Mr. Crow
May 22, 2008

Snap City mayor for life

Sedro posted:

I run teamcity in a docker container. There's nothing to it. Are you having a specific problem?

The latest teamcity can store its build configuration in code and version control it. They even have official docker images now. https://www.jetbrains.com/teamcity/whatsnew/

It works wonderfully when I use the IP and port directly but when I try and put it behind nginx in a reverse proxy it alternates between 404, 502 and not rendering 80% of the pages (and again 404ing trying to access certain parts of teamcity).

Mostly I'm having nginx problems, I guess you need some special settings for websockets but I haven't had much luck thus far and our internet is out today so hurray.




Related but tangential question, can someone explain to me the benefit of a docker data container vs just mounting a volume directly? It seems like an unnecessary layer of indirection, you're replacing being wired to the volume with being wired to the container. I'm missing something. You can share volumes between multiple containers in my experience so...?

Mr. Crow
May 22, 2008

Snap City mayor for life

poemdexter posted:

(I apologize in advance for screwing up the nomeclature since my docker experience has extended to about a week so far.) Anyone have a suggestion for managing docker services for use in deploying different branches of code? I'm using Jenkins to run shell commands after images are built and stored in private repo.

Example:
Branch A has image built (1.0).
Branch B has image built (2.0).
I want to deploy Branch A using `docker service update --image` since A is just the next version of that branch.
I want to deploy Branch B using docker service seperately instead of doing `docker service update --image` (right?).

Should I just have multiple docker services started already and just tell Jenkins to push something to whatever service respectively i.e. Service-A or Service-B?
Should I be starting up new services for all the one off branches that want to run independently? Is there a way to stop services after they aren't being used?

The goal is to allow QA to test multiple things independently if needed so that developers aren't waiting to push code because current QA environment is being used. We currently just have DEV/QA/PROD environments and builds get pushed around to the environments as needed but we're trying to migrate to docker since infrastructure team has drunk the koolaid. I'm just a developer, but do devops a lot for our team since we're sorta in control of our own destiny in terms of build/deploy and I'm the only one with any sort of experience.

Maybe I'm misunderstanding but just use tags? e.g. latest-dev, latest-qa, latest-prod

The latest tag with docker images is confusing and doesn't actually mean it's the latest version of an image; you have to explicitly tag it as such, there are a few baked in convenience features with it (uses latest if you don't specify which tag when `docker run` etc.); but fundamentally there is nothing different about it. Just create you're own convention for always using latest-XXX to get the latest version of whichever 'branch' you want.

I'm not sure there is a way to detect if a service isn't being used, seems like it would have to be baked into the service. I guess you could check the logs and see the last time it printed anything.

Mr. Crow
May 22, 2008

Snap City mayor for life
Alternatively, use volumes and mount the content into the proxy server container.

code:
 docker run -v /content:/var/www nginx

Mr. Crow
May 22, 2008

Snap City mayor for life
I'm struggling to automate creating VMs on an ESXi, any help would be appreciated.

I'm currently using packer (and new to it) to connect to the server and create a VM. I'm then trying to create a .box from it for vagrant and this is where it's failing, how do I tell vagrant to look on the server for the image and/or to expiry it back to my local machine? Will this custom .box even work and allow vagrant to up into the ESXi server (hoping it somehow baked the credentials into the box but I'm pretty sure this is not going to work in general)?

The biggest problem seems to be not having the ESXi server hooked into vcenter since all of the plugins for vagrant/Ansible that work with ESXi expect to be using vcenter, but getting that done is out of my hands (though something in working on).

Mr. Crow
May 22, 2008

Snap City mayor for life

theperminator posted:

If you use the Vagrant post-processor in your packer template it should automatically pull it down and do the work I'd think? Can you share your template?

Ended up getting vCenter installed so it's a non-issue.

I'm also 90% sure what I had in my head wouldn't have worked anyway, not without writing a custom plugin.

I can post what I had for posterity if anyone is curious but I wouldn't recommend that approach.

Mr. Crow
May 22, 2008

Snap City mayor for life

Vulture Culture posted:

Unsolicited opinion: if a code review takes 12 hours, your change batches are probably too big. Most of the code reviews I submit can be completed in a minute or two (this is obviously not true for enormous refactors)

I think he's probably saying people don't jump on the PRs as soon as they're assigned, which seems normal.

Mr. Crow
May 22, 2008

Snap City mayor for life
This book is excellent.

The DevOps 2.0 Toolkit: Automating the Continuous Deployment Pipeline with Containerized Microservices https://www.amazon.com/dp/B01BJ4V66M/ref=cm_sw_r_cp_apa_sQjfzbWBC57FV

The space is moving very fast but it's pretty up-to-date.

Mr. Crow
May 22, 2008

Snap City mayor for life
Ya it's meant to be hands on, it's less a book and more interactive guide.

Mr. Crow
May 22, 2008

Snap City mayor for life
A buzzword that can make a big difference in trying to drive change is explaining the idea of "mean time to recovery" vs "mean time to failure". Most people have heard of the later and it's what drives most of these archaic companies, less have heard of the former and even old school kludgey bastards have been more malleable to change after focusing and explaining the idea. YMMV of course.

Mr. Crow
May 22, 2008

Snap City mayor for life

Blinkz0rz posted:

A better question is why bother? Containers are designed to be ephemeral and short lived. That's why their deployment mechanisms emphasize scale up/scale down behavior and time-to-new-deployment speed.

Deploying a db in a container in production just feels unnecessary at best and a data loss risk st worst.

There are more reasons to use containers than them being ephemeral and there is nothing anywhere implying they need to be short lived.

Genuinely curious, can we have a valid argument not to beyond "databases need to be persistent and containers are not!"? I just hear a lack of understanding of docker (volumes).

Mr. Crow
May 22, 2008

Snap City mayor for life
On DB / container chat, here is a good HN thread that discusses it. It's relatively old, but still relevant https://news.ycombinator.com/item?id=13582757

TLDR: draw your own conclusions, it's not a silver bullet (and I don't think anyone is suggesting it is) but I'm personally going to keep an open mind and evaluate it per project as it comes up.

I don't think the usual knee jerk 'THE DB IS SACRED NEVER TOUCH IT' responses help anything.

Mr. Crow
May 22, 2008

Snap City mayor for life
On noob docker chat... the thing to realize is that the majority of their recommendations apply to running 'in the cloud' as that's where most of it's use is.

You can totally use it as a simple virtualized application environment on a single host though, just realize the intended market and all the guidance is going to be with the intention of multiple hosts in the cloud (see named volumes vs volume mounts).

We use it heavily in our CI process to simplify agent requirements, the only things agents need are vagrant and docker and everything else provides it's own build environment via one or both of those and the builders just basically 'docker run' everything.

It's nice when people need to pull down a project they're not working on too, don't need to figure out how to compile the dependencies or install them, can be up and running immediately.

Mr. Crow
May 22, 2008

Snap City mayor for life

Vulture Culture posted:

With all due respect, you come across like you're way more focused on the technology buzzwords than the problems they actually solve. Someone approaching automation tooling without the domain knowledge to actually do those things is at best unproductive and at worst really dangerous. Take a breather from things that support the software engineering process and learn the software engineering process.

LMBO

I hope that was a joke pay bonaparty otherwise see above. That sounds a lot like a recruiter who doesn't have any idea what they're talking about; trying to con some people into a job way below cost.

Mr. Crow
May 22, 2008

Snap City mayor for life
Also y'all act like there isn't a huge market and industry of companies and services running private clouds and guess what you need to use to set that up.

I will agree that puppet is hot garbage but that doesn't mean that everyone is or should be chomping at the bit to throw all their services onto AWS or GCP, or that it's even intelligent to do so (see the several plain text DoD classified info leaks on AWS).

That's a solution looking for a problem.

Mr. Crow
May 22, 2008

Snap City mayor for life
Ugh users being idiots has been the driving force behind restrictive IT policy since forever and is a definitive reason why companies wouldn't want to let their ip anywhere near public servers.

Mr. Crow
May 22, 2008

Snap City mayor for life

FamDav posted:

aws gives you practically all the tools necessary to have a restrictive IT policy if you want. for the above example, you can restrict the ability to create a publicly readable bucket organization-wide in about 10 lines of json.

there's plenty of valid reasons why you would prefer not to use public cloud, but the notion that its less secure or difficult/impossible to implement all kinds of IT policies is suspect.

Ok so you are being argumentative over a one-off anecdote of apparently dubious quality and then arriving at the same conclusion. :waycool:



I'm genuinely surprised so many of y'all dislike ansible and call it lacking, when was the last time you used it? Everyone else I've talked on and offline has loved it, myself included. I feel it has chef and puppet beat in almost all cases; usability, readability, getting new people or servers up and running etc.

What specifically is it lacking?

Mr. Crow
May 22, 2008

Snap City mayor for life

Heh

Mr. Crow
May 22, 2008

Snap City mayor for life
Stop using Windows :banjo:

Mr. Crow
May 22, 2008

Snap City mayor for life
Teamcity is real good. Every other CI server I've used I've been unimpressed with (Jenkins and Travis pretty much).

Mr. Crow
May 22, 2008

Snap City mayor for life
We do just fine :shrug:

Mr. Crow
May 22, 2008

Snap City mayor for life
Like the idea anyone would suggest Jenkins over anything is just :lol:

Mr. Crow
May 22, 2008

Snap City mayor for life
So Bitbucket is shuttering their self hosted option for some reason and we need to migrate to a new self hosted source control system. Gitlab is the obvious choice but I was curious is anyone uses anything else to success? Just want to weight our options

Mr. Crow
May 22, 2008

Snap City mayor for life
Ya bitbucket is fine.


This is maybe late but for the goon with large repo problem (same :hfive:), you could use --filter=blob:none which will tell git to not download binaries unless it needs them. Its better than --depth because you get the full git history just none of the blobs. This talks about some other strategies

https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/

Adbot
ADBOT LOVES YOU

Mr. Crow
May 22, 2008

Snap City mayor for life

Hadlock posted:

Docker was just exceptionally poorly managed, I can't think of a worse managed high profile company in recent years. They tanked before the #metoo movement but had they survived they probably would have been hit with some of that as well

its pretty incredible the amount of money and opportunity docker had and they just... did nothing with it.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply