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
freeasinbeer
Mar 26, 2015

by Fluffdaddy
Also Redhat clarified their plans for CoreOS and said that people were misreading the announcement. It looks like CoreOS lives!(for now at least)

https://groups.google.com/forum/m/#!topic/coreos-user/GR4YlF2c1dM

Adbot
ADBOT LOVES YOU

Docjowles
Apr 9, 2009

freeasinbeer posted:

Also Redhat clarified their plans for CoreOS and said that people were misreading the announcement. It looks like CoreOS lives!(for now at least)

https://groups.google.com/forum/m/#!topic/coreos-user/GR4YlF2c1dM

A couple threads here got confusing for a minute til I realized you changed your forum handle and avatar

freeasinbeer
Mar 26, 2015

by Fluffdaddy

Docjowles posted:

A couple threads here got confusing for a minute til I realized you changed your forum handle and avatar

One was foisted on me, other I figured I’d dump a name I made when I was 12.

Virigoth
Apr 28, 2009

Corona rules everything around me
C.R.E.A.M. get the virus
In the ICU y'all......



Vulture Culture posted:

And yet the only goon I've run across in Hangops or the Rands Leadership Slack rarely posts here anymore

I enjoy Rands but I lurk the gently caress out of it.

Docjowles
Apr 9, 2009

freeasinbeer posted:

One was foisted on me, other I figured I’d dump a name I made when I was 12.

Fair. The name I used when I first got on the internet (in the 90's, as I am super old) was extremely embarrassing and I'm glad I changed over to just pretending to be a fat old guy instead.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Docjowles posted:

Fair. The name I used when I first got on the internet (in the 90's, as I am super old) was extremely embarrassing and I'm glad I changed over to just pretending to be a fat old guy instead.

You're a step ahead of me...my posts and my were also super embarassing at that time. Every once in awhile I'll come across a post of mine on usenet from the early 90s and I just cringe.

(now they're just at a regular level of embarassing)

beuges
Jul 4, 2005
fluffy bunny butterfly broomstick
The past few pages of container-talk have convinced me to finally try to learn exactly how they work and start using them myself. Been reading through some documentation while waiting for things to download, but there's something that's confusing me so far:

I'm developing on Windows 10 and deploying to Windows Server. Docker says that it doesn't require a VM and can run directly off the underlying OS. But since there's no Windows 10 base image, it looks like I have to download a Windows Server Core image. This makes sense.

So is Docker going to run Windows Server in a VM off Windows 10, and then run my containers in the VM?
On my target machine, if the Windows Server version matches the docker base image OS version, will it run the containers directly off the underlying OS via the docker engine, or will it still create a Windows Server VM on my Windows Server machine regardless?
If it can create VMs when the OS that the container is configured for doesn't match the underlying OS, can I run containers for Linux and Windows on the same box or is it limited to just one OS type per docker engine? Related, could I run containers for Windows Server Core and Windows Server Nano side by side on the same box, even though they are different base images?

All very basic stuff I'm sure, but I've not had a chance to get started with containers before now, and I want to make sure I understand things properly and not half-assed.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

beuges posted:

So is Docker going to run Windows Server in a VM off Windows 10, and then run my containers in the VM?

No. Windows containers use Hyper-V as a hosting mechanism. Hyper-V actually treats even the host OS as a VM, albeit a very special VM.

beuges posted:


On my target machine, if the Windows Server version matches the docker base image OS version, will it run the containers directly off the underlying OS via the docker engine, or will it still create a Windows Server VM on my Windows Server machine regardless?

Stop thinking in terms of VMs. Containers aren't VMs, they are isolation layers. Windows containers run on the Hyper-V hypervisor to get access to system resources (CPU, memory, disk, etc). The "base image" is more of a set of basic capabilities than it is a full OS. This is why containers start in a few seconds instead of a minute or two -- starting a container doesn't involve booting up a full kernel, it just hooks into the already-running kernel. This is, of course, a massive simplification.

beuges posted:

If it can create VMs when the OS that the container is configured for doesn't match the underlying OS, can I run containers for Linux and Windows on the same box or is it limited to just one OS type per docker engine? Related, could I run containers for Windows Server Core and Windows Server Nano side by side on the same box, even though they are different base images?

Windows can run Windows containers. Linux can run Linux containers. Windows can also run Linux containers, but not at the same time as Windows containers.

In the case of Linux containers running on Windows, it actually does use a Linux VM to host the containers.

You can run as many different containers from different base images as you want, as long as the OS "flavor" is the same -- Windows or Linux.

FWIW, my experience with containers for Windows hasn't been great so far.

New Yorp New Yorp fucked around with this message at 16:50 on Feb 4, 2018

beuges
Jul 4, 2005
fluffy bunny butterfly broomstick

New Yorp New Yorp posted:

Stop thinking in terms of VMs. Containers aren't VMs, they are isolation layers. Windows containers run on the Hyper-V hypervisor to get access to system resources (CPU, memory, disk, etc). The "base image" is more of a set of basic capabilities than it is a full OS. This is why containers start in a few seconds instead of a minute or two -- starting a container doesn't involve booting up a full kernel, it just hooks into the already-running kernel. This is, of course, a massive simplification.

Sure, but my understanding/experience of Hyper-V so far has been a means to run VMs, hence my confusion. Also, I was trying to work out how it would handle presenting the Server Core base image to the container when it was actually running on Windows 10, but I guess since they basically share the same kernel for the most part, that makes it a lot easier.
This does make things clearer for me though, thanks!

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

beuges posted:

Sure, but my understanding/experience of Hyper-V so far has been a means to run VMs, hence my confusion. Also, I was trying to work out how it would handle presenting the Server Core base image to the container when it was actually running on Windows 10, but I guess since they basically share the same kernel for the most part, that makes it a lot easier.
This does make things clearer for me though, thanks!

No problem! I've been on a Windows containers kick lately, trying to containerize a C# build environment. It's been unpleasant.

Linux containers work great, though.

Hadlock
Nov 9, 2004

Windows container stuff is kind of hard mode.

Try spinning up a ghost blog container in a Linux VM first, figure out docker volumes, container networking, passing in env vars first before attempting anything complicated in Windows land.

Methanar
Sep 26, 2013

by the sex ghost
How does everyone do their source control for Kubernetes and interaction with Kubernetes.

Dumping a bunch of yaml files into a git repo is with a readme.md explaining what they do is a terrible bad way of doing things. Someone tell me why helm charts should not be used as a deployment mechanism for internally produced applications.

How about things like rolling updates. Should I wrap all of the commands associated with doing rolling upgrades in a jenkins task runner that someone can just click on. Should I wrap helm charts with Jenkins? Should I use github as a Helm chart repo?

Hadlock
Nov 9, 2004

Is there a thing that will scrape my Prometheus endpoints in one secure zone, and then push them to Prometheus gateway on my centralized server in another secure zone so that I'm only allowing a single connection on a single port between the two.

freeasinbeer
Mar 26, 2015

by Fluffdaddy

Hadlock posted:

Is there a thing that will scrape my Prometheus endpoints in one secure zone, and then push them to Prometheus gateway on my centralized server in another secure zone so that I'm only allowing a single connection on a single port between the two.

Uh. Maybe abusing pushgateway? Or just have a centralized grafana?

Edit: https://prometheus.io/docs/prometheus/latest/federation/


And there seem to be some caveats:
https://www.robustperception.io/federation-what-is-it-good-for/

I’d just hook a remote grafana to it depending on your needs.

freeasinbeer fucked around with this message at 03:26 on Feb 7, 2018

Hadlock
Nov 9, 2004

It sounds like Federation is what I need to do? Good link.

Mao Zedong Thot
Oct 16, 2008


Methanar posted:

How does everyone do their source control for Kubernetes and interaction with Kubernetes.

Dumping a bunch of yaml files into a git repo is with a readme.md explaining what they do is a terrible bad way of doing things. Someone tell me why helm charts should not be used as a deployment mechanism for internally produced applications.

How about things like rolling updates. Should I wrap all of the commands associated with doing rolling upgrades in a jenkins task runner that someone can just click on. Should I wrap helm charts with Jenkins? Should I use github as a Helm chart repo?

makefiles and yaml

Helm is awful, it's a massively overcomplex way to....... write templated yaml, where the template values don't ever change in practice anyway oh well lol

edit: ksonnet seems cool, but I haven't used it, nor do I grok it quite.

edit edit: Mostly, I think you shouldn't be doing complex poo poo in your resource files, and if you are, you should find or build a better way to do it, or move or abstract that complexity elsewhere. You shouldn't be doing a whole bunch more than `kubectl apply -f foo.yaml`

Mao Zedong Thot fucked around with this message at 05:17 on Feb 7, 2018

Warbird
May 23, 2012

America's Favorite Dumbass

Is there a decent Windows DevOps/Sysadmin/automation for Jackasses course or book any of you can recommend? Small words are a must.

Spring Heeled Jack
Feb 25, 2007

If you can read this you can read

Warbird posted:

Is there a decent Windows DevOps/Sysadmin/automation for Jackasses course or book any of you can recommend? Small words are a must.

Seconding this. I’m a sysadmin at a company that is looking to move to containers when they deploy some of our new website apps. The lead dev is completely familiar with everything on that end, but as a JOAT sysadmin I’m looking to get up to speed. We run IIS/MSSQL for everything currently but they’re shifting to .NET Core so we can run Linux containers.

We would be using azure (as it stands currently) for our container environment, so I’m just looking for something to get me started as my list of things to get familiar with keeps growing. I do have a Pluralsight sub at my disposal!

The NPC
Nov 21, 2010


Spring Heeled Jack posted:

Seconding this. I’m a sysadmin at a company that is looking to move to containers when they deploy some of our new website apps. The lead dev is completely familiar with everything on that end, but as a JOAT sysadmin I’m looking to get up to speed. We run IIS/MSSQL for everything currently but they’re shifting to .NET Core so we can run Linux containers.

We would be using azure (as it stands currently) for our container environment, so I’m just looking for something to get me started as my list of things to get familiar with keeps growing. I do have a Pluralsight sub at my disposal!

Starting down a similar path. I just finished The DevOps Handbook and highly recommend it. Gonna grab The Phoenix Project next. I was looking for Windows specific books before the holidays, but it looks like the few Windows specific books are going to be published in the coming months. Get familiar with Powershell if you aren't already as well as some Linux environment.

Whether you're on Linux or Windows, Docker underpins everything and Kubernetes seems to coming out on top for orchestration, AKS being managed Kubernetes.

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

So I'm working on a web application, which gets compiled, dockerized, pushed to registry, and launched on the test server by the Gitlab CI. Which was pretty cool to do.

I've set it so that the master branch will always be launched publishing on a fixed port. But I would also want feature branches to be launched automatically on separate ports - one port per branch, with newer builds from the same branch (= same image tag) ending up on the same port, so we can try them out in parallel.

For this build step, the best I've come up with so far is a script that derives a port number from the branch name (hash, modulo 1000, add 6000, knowing that 6k to 7k are available); while fun, this is not a reliable solution since eventually I'll get a port conflict between two branches and the CI will mysteriously fail.

Ideally, I'd want a docker run option that says "publish this container port on the first available host port after $startPort". My next idea was to write a loop that tried to run on 6000, detects if the failure to launch was due to a port conflict, and if so increments the port number and tries again - but this was the point where I thought 'hold on, before I write any more bash lines I should probably check with someone else that I'm not missing a much simpler alternative or running down the wrong rabbit hole'. Am I missing a much simpler alternative or running down the wrong rabbit hole?

JehovahsWetness
Dec 9, 2005

bang that shit retarded
Docker doesn't have a way to check for an available port bind/mapping before launch, but it can tell you the port mappings for running a container via "docker port ...":

code:
~ docker run -d -p 9999:80 nginx:alpine
Unable to find image 'nginx:alpine' locally
alpine: Pulling from library/nginx
550fe1bea624: Pull complete
d421ba34525b: Pull complete
fdcbcb327323: Pull complete
bfbcec2fc4d5: Pull complete
Digest: sha256:c8ff0187cc75e1f5002c7ca9841cb191d33c4080f38140b9d6f07902ababbe66
Status: Downloaded newer image for nginx:alpine
7f76c74ce33954fdb58d7f96e0671d86f359239cf57466e33d904227e32e993d
~ docker port 7f76c74ce33954fdb58d7f96e0671d86f359239cf57466e33d904227e32e993d
80/tcp -> 0.0.0.0:9999
So instead of launching and failing you could at least iterate the running containers and figure out the next available port then launch.

Alternatively, you can just bind to port 0 and it'll auto-pick some random-rear end free ephemeral port that you can then query via "docker port" or "docker inspect":

code:
~ docker run -d -p 0:80 nginx:alpine
a04d996b38b23f99a451a4d8067ecabbaa8a6b2e5bfcbfd3b342889b7676864a
~ docker port a04d996b38b23f99a451a4d8067ecabbaa8a6b2e5bfcbfd3b342889b7676864a
80/tcp -> 0.0.0.0:32768
~ docker inspect -f '{{ (index (index .NetworkSettings.Ports "80/tcp") 0).HostPort }}' a04d996b38b23f99a451a4d8067ecabbaa8a6b2e5bfcbfd3b342889b7676864a
32768

Sedro
Dec 31, 2008
This thing will reverse proxy the docker port
https://github.com/jwilder/nginx-proxy

Then you can docker run -p 9999 -e VIRTUAL_HOST=${BRANCH_NAME}.yourdomain.com your-image

It's a pain in the rear end to debug though when something goes wrong

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

JehovahsWetness posted:

Alternatively, you can just bind to port 0 and it'll auto-pick some random-rear end free ephemeral port that you can then query via "docker port" or "docker inspect"

Aaand there's the super simple alternative I didn't know about :downs: It's not even random either, it starts at 32768 and looks for the next available port, i.e. exactly what i was about to try manually. Thanks!

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

The NPC posted:

Starting down a similar path. I just finished The DevOps Handbook and highly recommend it. Gonna grab The Phoenix Project next. I was looking for Windows specific books before the holidays, but it looks like the few Windows specific books are going to be published in the coming months. Get familiar with Powershell if you aren't already as well as some Linux environment.

Whether you're on Linux or Windows, Docker underpins everything and Kubernetes seems to coming out on top for orchestration, AKS being managed Kubernetes.

You can skip the Phoenix Project if you're interested in technical details. It's mostly about Agile project management and does not go into any technical depth at all.

StabbinHobo
Oct 18, 2002

by Jeffrey of YOSPOS
you can only skip phoenix project if you have 100% found religion about bottlenecks and local vs systemic optimization

Docjowles
Apr 9, 2009

You can read the Phoenix Project in like two days so it’s not a huge investment in any case. It’s definitely a book for managers trying to understand why traditional IT service delivery sucks rear end, or people who want to formulate that same argument for their own managers. It won’t teach you a drat thing about containers or kubernetes or Jenkins or infrastructure as code. But it might help you understand or explain why they are cool and good. I think it’s short, entertaining, and insightful enough to be worth a read.

It’s literally The Goal retold for IT, if that helps place it.

Dr. Arbitrary
Mar 15, 2006

Bleak Gremlin
Back when we had an IT reading group, people seemed to really enjoy it, everyone seems to know at least one of the characters in the book in their own organization.

Docjowles
Apr 9, 2009

That thread owned and I’d love to see it revived. VC was totally carrying it, though, and had a kid which tends to mean the death of things like time to “read” and “think”. I’ve been reading the Google SRE book basically since it came out between caring for two kiddos and somehow still haven’t finished it.

I did take a detour to read The Manager’s Path which is very very good, and great fodder for that thread if it does rise from the grave.

Volguus
Mar 3, 2009

Docjowles posted:

You can read the Phoenix Project in like two days so it’s not a huge investment in any case. It’s definitely a book for managers trying to understand why traditional IT service delivery sucks rear end, or people who want to formulate that same argument for their own managers. It won’t teach you a drat thing about containers or kubernetes or Jenkins or infrastructure as code. But it might help you understand or explain why they are cool and good. I think it’s short, entertaining, and insightful enough to be worth a read.

It’s literally The Goal retold for IT, if that helps place it.

Awesome. Next on my reading list once im done with the end of eternity. For now I'm just waiting for Andrew Harlan to just get hosed in some way. What an rear end in a top hat.

necrobobsledder
Mar 21, 2005
Lay down your soul to the gods rock 'n roll
Nap Ghost
My issue with the SRE book is that it was more a collection of stories and blogposts as long form than a book with a clear narrative and guideline. A lot of the material seemed to overlap thematically in a way that seemed redundant. On the other hand, Programming Pearls is similar that way but at least I didn’t think I was getting a paragraph on fixing binary search integer overflow for the fifth time like the SRE book spent talking about monitoring subtopics. I still think Time Management for System Administrators is more important of a read for today’s engineers, honestly. While we learn as engineers how to optimize programs for time and space efficiency, it amazes me to see people fail to spend even 1000th the effort on managing their own time when that’s probably the greatest limiting factor for your programming output in the end. I say this as someone so terrible at time management it’s part of why I decided to never have children. Great goal setting and time management is among the traits of those with long-term career and life success more than knowing more ways to sort data structures than others.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

necrobobsledder posted:

My issue with the SRE book is that it was more a collection of stories and blogposts as long form than a book with a clear narrative and guideline. A lot of the material seemed to overlap thematically in a way that seemed redundant. On the other hand, Programming Pearls is similar that way but at least I didn’t think I was getting a paragraph on fixing binary search integer overflow for the fifth time like the SRE book spent talking about monitoring subtopics. I still think Time Management for System Administrators is more important of a read for today’s engineers, honestly. While we learn as engineers how to optimize programs for time and space efficiency, it amazes me to see people fail to spend even 1000th the effort on managing their own time when that’s probably the greatest limiting factor for your programming output in the end. I say this as someone so terrible at time management it’s part of why I decided to never have children. Great goal setting and time management is among the traits of those with long-term career and life success more than knowing more ways to sort data structures than others.
The almost-technophobic approach to GTD that Limoncelli uses seemed kind of weird at the time, but the book has probably aged better for it.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
We're about to expand our TeamCity suite to include things like ongoing rolling regressions. We can represent these in TeamCity itself, but this is hitting my sense of smell based on what I read on here awhile ago. I get the impression we should implement most of this rolling regression in a script with a data file in source control. The data file can be adjusted per-commit to ensure that we are testing what's on the HEAD. We've already had issues with somebody changing the test plan in TeamCity and having it -1 all inbound reviews due to a global regression. We had to fix that regression, but none of the commits were targeting that. So I figured instead that being able to pair this QA suite with the current state of the code will be a bulwark against that.

The general consensus I've seen is to kind of keep these tools at arm's reach. Use them--yes, but don't try to put everything into them. I don't entirely understand why. I just see more people complaining about having gone all-in and then stepping back versus people making fun of others for not completely committing into putting everything in the CI tool itself.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Rocko Bonaparte posted:

We're about to expand our TeamCity suite to include things like ongoing rolling regressions. We can represent these in TeamCity itself, but this is hitting my sense of smell based on what I read on here awhile ago. I get the impression we should implement most of this rolling regression in a script with a data file in source control. The data file can be adjusted per-commit to ensure that we are testing what's on the HEAD. We've already had issues with somebody changing the test plan in TeamCity and having it -1 all inbound reviews due to a global regression. We had to fix that regression, but none of the commits were targeting that. So I figured instead that being able to pair this QA suite with the current state of the code will be a bulwark against that.

The general consensus I've seen is to kind of keep these tools at arm's reach. Use them--yes, but don't try to put everything into them. I don't entirely understand why. I just see more people complaining about having gone all-in and then stepping back versus people making fun of others for not completely committing into putting everything in the CI tool itself.
It depends on how much you buy into the concept of "write code that's easy to delete, not easy to extend." Overcommitment to a CI platform's pipeline to drive things introduces some super-tight coupling that can make it difficult to test things in isolation. That in turn can make it hard to iterate on things without either maintaining parallel, piecemeal CI runners, or shoving every tweak through a 30-minute build stage when the part you're interested in testing takes 20 seconds.

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
My 0.02 is that if you’ve got everyone on-board with putting everything into a particular CI tool (like TC) then go for it; you can use build chains, snapshot dependencies, etc. to break your build up into logical chunks so that things can be run in isolation/iterated on.

That said, this is as much a people problem as it is a technical one. If people are used to being able to do things in increments, even if you give them a way to in TC, they’re just gonna click ‘run’ on whatever and let god sort out the details.

I don’t really have an answer for you outside of that. The biggest thing I think helps is making sure that devs understand how to use TC really well.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
The big thing here is somebody would want to add a step towards a regression, but we don't want unrelated commits that don't even have the matching code to fail. I expect the incompatible code to get through because it has already happened two of three times we did this. We were about to start adding more steps more often, and I don't want it to become a game of us having to get together and turn our keys at the same time.

Lily Catts
Oct 17, 2012

Show me the way to you
(Heavy Metal)
Has anyone tried learning DevOps using small, personal projects? If so, how do you go about them? I've been thinking of getting a DigitalOcean droplet to practice DevOps stuff and tools which should help me with my work and hobbies (been thinking of making a couple of online apps to catalog information related to them). I don't want to be vendor-locked so I want to keep things as open source as possible.

Warbird
May 23, 2012

America's Favorite Dumbass

The closest I’ve come to that is leveraging the multiple VMs you get with Linux Academy. It’ll do in a pinch for smaller projects, but isn’t perfect. I’ve been debating trying AWS, but haven’t done so yet.

Hughlander
May 11, 2005

Schneider Heim posted:

Has anyone tried learning DevOps using small, personal projects? If so, how do you go about them? I've been thinking of getting a DigitalOcean droplet to practice DevOps stuff and tools which should help me with my work and hobbies (been thinking of making a couple of online apps to catalog information related to them). I don't want to be vendor-locked so I want to keep things as open source as possible.

I have a small VPS that I got tired of rebuilding when I moved to different providers. So I used puppet to configure it for a bit, tested it locally with vagrant, and now it's a docker compose file with a mix of locally built containers, registry containers, and private registry containers.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Schneider Heim posted:

Has anyone tried learning DevOps using small, personal projects? If so, how do you go about them? I've been thinking of getting a DigitalOcean droplet to practice DevOps stuff and tools which should help me with my work and hobbies (been thinking of making a couple of online apps to catalog information related to them). I don't want to be vendor-locked so I want to keep things as open source as possible.
I'm getting really, seriously twitchy at this particular use of the word "DevOps".

Adbot
ADBOT LOVES YOU

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Schneider Heim posted:

Has anyone tried learning DevOps using small, personal projects? If so, how do you go about them? I've been thinking of getting a DigitalOcean droplet to practice DevOps stuff and tools which should help me with my work and hobbies (been thinking of making a couple of online apps to catalog information related to them). I don't want to be vendor-locked so I want to keep things as open source as possible.

You can always install Jenkins locally on your machine or spin up a Docker image containing Jenkins and run your personal projects through that. I really wish this was forced behavior for javascript devs at work since they are the worst at "works on my machine" mentality when it comes to jobs failing due to build issues.

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