Reddit DevOps
278 subscribers
70 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
How can I logically link two branches in two separated git repos for the creation of a temporary frontend app that should query its backend?

Our devs wants to have a temporary web app running whenever they push a feature branch to the repo. I got this part going already, I'm using Heroku for the infra and GitLab for CI/CD.

On the API repo they do the same thing, they push a branch and they get a temporary version of said push.

The problem is that I don't know how to logically link both of these automatically. The temporary frontend should talk to the temporary backend.

I know that I have to set and environment variable to point the front to the back, but I'm stuck in the part of how to link both of these independent branches together programmatically in the pipeline, if that makes sense.

I thought about using the same git tags on both branches but didn't get around it yet. I also thought about using Terraform in the pipeline to spin both apps and then make it somehow query its state to link both up.

Any help?

https://redd.it/e55t9z
@r_devops
Tech Professionals - Challenges with Fitness

I know that many Tech Professionals are struggling with losing weight, getting in shape and building healthy eating habits. For all those that are struggling with getting in good shape, what are some of your biggest challenges in this area of your life ?

What keeps you from reaching your fitness goals & What bothers you the most about ?

https://redd.it/e4t7pc
@r_devops
How to upgrade Ruby Bundle version in AWS Opsworks

I have a project running on AWS Opsworks, which has current bundler version of ***1.5.3*** on ***Ruby 2.2.2***.

i want to upgrade the bundle version to ***1.17.3***

but when i try to do it i am getting this error

Compiled Resource:
------------------
# Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/opsworks_bundler/recipes/default.rb:2:in `from_file'

gem_package("Installing Bundler 1.17.3") do
provider Chef::Provider::Package::Rubygems
action [:install]
retries 0
retry_delay 2
package_name "bundler"
version "1.17.3"
cookbook_name "opsworks_bundler"
recipe_name "default"
gem_binary "/usr/local/bin/gem"
end



[2019-12-03T07:24:08+00:00] INFO: Running queued delayed notifications before re-raising exception
[2019-12-03T07:24:08+00:00] ERROR: Running exception handlers
[2019-12-03T07:24:08+00:00] ERROR: Exception handlers complete
[2019-12-03T07:24:08+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2019-12-03T07:24:08+00:00] ERROR: gem_package[Installing Bundler 1.17.3] (opsworks_bundler::default line 2) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /usr/local/bin/gem install bundler -q --no-rdoc --no-ri -v "1.17.3" ----
STDOUT:
STDERR: ERROR: Error installing bundler:
"bundle" from bundler conflicts with /usr/local/bin/bundle
---- End output of /usr/local/bin/gem install bundler -q --no-rdoc --no-ri -v "1.17.3" ----
Ran /usr/local/bin/gem install bundler -q --no-rdoc --no-ri -v "1.17.3" returned 1
[2019-12-03T07:24:08+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)


[Opswork configuration](https://i.stack.imgur.com/eUaxe.png) the bundler version was previously 1.5.3 i changed it to 1.17.3 and thats when the errors started to come

when i run bundle -von the server i am getting bundler version as **1.5.3.** what ever i do i cannot change the bundle version from that.

how to add configuration in either the chef recipe or anywhere else to update the bundle version ?

any suggestion will help me a lot. i have no experience working with chef or opsworks i have good working experience in working with EC2s and linux bash.

Our devops team doesn't know how to work with either. i am trying to solve an issue on a client's application which was launched on 2014 and hasn't ever been touched.

https://redd.it/e5g3jf
@r_devops
Apache Archiva in Front of Maven

I thought this would be no-brainer, but it's a little more difficult than I was led to believe by the [quick start documentation](https://archiva.apache.org/docs/2.1.1/quick-start.html).

I added the URL to the local Archiva server as a [mirror](https://archiva.apache.org/docs/2.1.1/userguide/using-repository.html) in settings.xml, and I know it has an effect because the maven build now breaks. The first thing was that the missing version stamps on the helper plugins went from a warning to an error:

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.github.jitpack:maven-simple:jar:0.2-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 35, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 49, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------< com.github.jitpack:maven-simple >-------------------
[INFO] Building Simple Maven example 0.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.512 s
[INFO] Finished at: 2019-12-01T20:57:26-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-source-plugin' from the repositories [local (/home/tad/.m2/repository), archiva.default (https://localhost:8080/archiva/repository/internal/)]: Plugin not found in any plugin repository -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] https://cwiki.apache.org/confluence/display/MAVEN/PluginVersionResolutionException


But I fixed that by adding current version numbers to each plugin mentioned in the pom.xml.

Now it is complaining about missing pom.xml files for each of those plugins:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.github.jitpack:maven-simple >-------------------
[INFO] Building Simple Maven example 0.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.apache.maven.plugins:maven-source-plugin:jar:3.2.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.127 s
[INFO] Finished at: 2019-12-01T20:59:09-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-source-plugin:3.2.0 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-source-plugin:jar:3.2.0 in https://localhost:8080/archiva/repository/internal/ was cached in the local repository, resolution will not be reattempted until the update interval of archiva.default has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the erro
rs and possible solutions, please read the following articles:
[ERROR] [Help 1] https://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

I'm guessing that there's more to do than just starting Archiva and pointing to it, but searching for "maven archiva howto" or for "maven archiva missing pom.xml" doesn't find me very much that seems relevant.

What I'm wanting to do is to use Archiva as a local mirror for dependencies when working down a narrow-bandwidth pipe, and also to add a few dependencies we have that aren't available across the internet. I thought that this should be the sort of thing that Archiva does out of the box, but the guide is 5 years old, so may be there's some other bit of configuration that is needed that I'm missing...?

Thanks for any thoughts!

https://redd.it/e4sm9w
@r_devops
Question about local Docker options

I am needing some advice about how to handle supplying Docker instances locally for our developers.

As a company we are just now getting into "devops" but we have several projects running on our current k8s platform. We have several hundred devs and only a select few are using docker and k8s currently but it looks like the majority of them are going to want to use the platform eventually. Specifically my question is:

What are good options for providing local docker instances for our devs to work on? We are a windows shop mostly so all desktops are running win10. We have explored Docker for Windows but we've seen multiple problems with it conflicting with vmware Horizon. The other option is to create linux vm's with docker installed there but considering the amount of devs we have, this isn't ideal either because of the new work that creating 300-400 new vms would bring, including supporting a whole new environment like that. Is there a better option? What are other mature companies doing?

Thanks for the help!

https://redd.it/e5jsgz
@r_devops
Is testing considered important in devops?

In my org, our devops team doesn't seem to test their changes to our infrastructure as it relates to the software we support and it tends to be an afterthought. Typically things seem to get thrown over the wall to QA and our engineering team. Is this commonplace at most companies?

https://redd.it/e5g1m3
@r_devops
How much do you guys earn and what location?

I recall the stackoverflow survey said devops and sre were some of the highest paid. Anyone willing to share some data?

https://redd.it/e5ks7p
@r_devops
Going Docker, Swarm and Kubernetes Production Like a Pro

This is a 45 minute talk from GOTO Berlin 2019 by Bret Fisher, Docker captain, DevOps trainer and consultant. I've dropped the link to the talk along with the full talk abstract below for a read before diving into the talk:

[https://youtu.be/5zY5\_iTGIsU?list=PLEx5khR4g7PKMVeAqZdIHRdOwTM1yktD8](https://youtu.be/5zY5_iTGIsU?list=PLEx5khR4g7PKMVeAqZdIHRdOwTM1yktD8)

Learn fast from my years of being a container consultant and Docker implementer. Come join me for a jam-packed session of decisions you need to make and key technical factors you should know. No fluff, all practicals. Updated for 2019 and based on my 3 years of top-10 DockerCon talks.

**You should show up if:**

* You are planning or involved with building/using a Docker production system.
* You are thinking of using Swarm and/or Kubernetes (but not required).
* You like random 80's/90's video game trivia thrown at you.

DevOps in the Real World is far from perfect, yet we all dream of that amazing auto-healing fully-automated micro-service infrastructure that we'll have "someday." But until then, how can you really start using containers today, and what decisions do you need to make to get there?

This session is designed for practitioners who are looking for ways to get started now with Docker and container orchestration in production. This is not a Docker 101, but rather it's to help you be successful on your way to Containerizing your production systems. Attendees will get tactics, example configs, real working infrastructure designs, and see the (sometimes messy) internals of Docker/Kubernetes in production today.

**Session Topics**

* Preventing scope creep in your project planning (what you can throw out)
* Easy Dockerfile anti-patterns
* OS and Kernel choice
* Container image choice
* Swarm and Kubernetes architecture designs
* Infrastructure layers to maybe outsource
* Infrastructure "stacks", layer the solution from low-level OS choices to high-level cluster GUI's

https://redd.it/e5kylz
@r_devops
Is this a career I should pursue?

I am 42 years old. I was historically an Electrical Engineer and firmware developer. I moved from the big city into a smaller city for a job. That company closed down. I was laid off. I got another job doing industrial controls. That company also downsized.

I took a CS50 course and got a software QA job. That company had a 25% layoff, myself included.

After 3 layoffs in 4 years, I am trying to figure out what the hell I am supposed to do with my life. At my last job, the devOps guy appeared to be on top of things and was happy with his job. This made me wonder if I should look into that.

I need some honest input. Is devOps something that a 42 year old guy who's only experience is python, .net, C, C++ would be able to break into....or is my resume going to continue getting sideways looks from employers?

\-Is it something that can be done from an Entry level position?

\-Is it something that you are generally happy with, or do you not enjoy it?

\-Is it something that can be done remotely?

\-I'm getting burned out of constantly learning new things. Is there a high barrier to entry for it? (Am I going to be going to school for another year?)

&#x200B;

Any input would be greatly appreciated. My career no longer exists where I live, but I still need to support my family. I'm in a pretty tough spot right now.

https://redd.it/e5ot9f
@r_devops
Assistance Securing EKS Cluster

Is anyone using EKS in production managed to secure the cluster?
My current environment uses AWS transit gateways and sub accounts and as a result, it’s difficult to setup the DNS resolver for a private API endpoint.

Would anyone have experience with this, or would the IAM permissions be sufficient to keep the cluster secure?

Thanks!

https://redd.it/e5r96u
@r_devops
Bitbucket pull request notifications for triggering builds

For those of you who use Bitbucket, how do you handle pull request notifications?

We were using a plugin, but after a Bitbucket upgrade, it all stopped working. Looking for a more permanent solution.

The plugin offered tons of parameters such as the email of the author of the pull request and the commit hash of the branch, but Bitbucket's hooks don't include that functionality.

https://redd.it/e5qz23
@r_devops
Dev image customizations?

With dev, build, test, and prod running the same image, I was wondering how devs using those images handle customization. Like dotfiles and stuff.

What do you guys do?

https://redd.it/e5q2nn
@r_devops
Database IaC solution for private networks?

Lately I've been trying to figure out what's the best way to maintain the database IaC I've mounted for my instances. I've always pushed the 'fix it' now solution but I don't know what would be the best one, I always feel like it's not enough.

The first thing I did was using the google provider of Terraform, and yes, almost every single piece of the infrastructure is in Terraform. The thing is that I was also in charge of user and schema management and soon I realized that GCP CLI doesn't support something as essential as MySQL grants, so I migrated into the terraform MySQL provider. So, the MySQL provider works like a local MySQL client and I'm also running terraform locally so that means Terraform connects to the instance to run code and to even run a plan so I need to be whitelisted beforehand.

Right now I'm in the process of making those instances private and that would mean they would be unreachable for my MySQL provider. the next move I'm planning would be moving terraform into the vpc. That'd mean getting instances (1 for each env) do a little app with simple APIs that run every tf command, RBAC and auditing. But I don't think I like the idea of maintaining that and I don't think it's a robust solution.

So my other option would be Terraform cloud, which has all I need, but the problem is that my DBs would be unreachable, to solve that I've tried an ssh provider I found [https://github.com/stefansundin/terraform-provider-ssh](https://github.com/stefansundin/terraform-provider-ssh) so I can tunnel through the bastion because Terraform is not supporting SSH tunneling yet, but it's not working I don't know why, also that doesn't sound solid to me as well. Another solution I thought could be detaching the MySQL code and get that into a terraform module inside the VPC that runs separately.

I'm also considering Terraform enterprise which is self hosted so I can put that inside my VPC to reach the instances, I have to test it out but that sounds like a possible solution.

I'm also considering moving away from terraform for MySQL management but I don't know of another tool (I've tried Liquibase which is not meant for something like this) .

I'd really appreciate any advice!

https://redd.it/e5o3gy
@r_devops
OpenTracing vs AWS X-Ray

I'm evaluating distributed tracing solutions for my current company. Does anyone have any advice as to whether AWS X-Ray or OpenTracing (Jaeger, for instance) is a better approach?

https://redd.it/e5n3yp
@r_devops
Edge proxy for Consul Connect?

I know this one has made its round but I'm wondering if anyone has come up with anything in last month?

[It has been added to v1.7.0 milestone](https://github.com/hashicorp/consul/issues/5695#issuecomment-539540302) but who knows when will that come out, and how stable will it be on the first day.

I've also skimmed through [the forum](https://discuss.hashicorp.com/t/edge-load-balancing-for-consul-connect/2993/9) and tried a lot of things that are mentioned in the comments but can't get reliable results from anything.

Today I'm going to try the recently released support for root and leaf CA in [consul-template](https://github.com/hashicorp/consul-template#caleaf) and put together a frankenproxy with Envoy and consul-template, lets see how that goes.

https://redd.it/e5gvad
@r_devops
Grafana & InfluxDB data backed by an NFS (EFS) mount

Hey there,

I was wondering, has anyone tried to use containerized grafana & influxdb with their data mounted via an EFS AWS volume (or any other network filesystem). Any idea on a good way to benchmark such a setup? Does it even make sense to try it?

https://redd.it/e5ldyr
@r_devops
Best open source monitoring tool

I'm learning devops, and doing it by setting up a homelab. My next step is to set up a monitoring/metric/alerting solution. I was looking at Elastic stack, since it pretty much meets my demands (yes I'm learning, but I still have some specific use cases). However their business practices recently has turned me off from them quite a bit.

I've looked at promethus+grafana, but it looks like that only metric collection, and not logging?

So my question is, what should I look into using? Is there a good (free) alternative to Elastic, or should I just bite bullet?

https://redd.it/e5xx7n
@r_devops