Reddit DevOps
278 subscribers
70 photos
32.2K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
What is the CI/CD tool at Tesla/SpaceX?

I vaguely remember that GitLab had Tesla listed as one of their customers a few months ago but it's not there anymore. In general I'd like to know what CI/CD tools are being used in a place where there are a lot of embedded devices/development.

https://redd.it/e20c9p
@r_devops
Help with IBM functions

Hey guys,

I have a problem with the return values of IBM Functions using the "Enable as Web Action" HTTP link. There forum is dead and so is their reddit. Was hoping one of you might be able to help me with this problem.

I have an very simple **Python** function that just raises an Exception:

import sys
def main(dict):
raise Exception("Why you do this IBM?")
return { 'message': 'Hello world' }

When invoking the function using the button on the website this is whats shown under "Results": (looks good)

{
"error": "Why you do this IBM?"
}

But when calling the function via HTTP request (using Postman) this is whats returned:

{
"code": "909f88a14c771bc0dd5592d12456f9ec",
"error": "Response is not valid 'application/json'."
}

Second Example using **Node.js** (again throwing a exception):

function main(params) {
throw "Whyyyy IBM?"
return { message: 'Hello World' };
}

When invoking the function using the button on the website this is the result: (looks good):

{
"error": "An error has occurred: Whyyyy IBM?"
}

And again when calling the function via HTTP request (using Postman) this is whats retuned:

{
"code": "8ad0376f32e811a02aa1db14e72bed72",
"error": "There was an error processing your request."
}

How can i get the same return value as when pressing the button using HTTP requests? Thank you

https://redd.it/e21f2h
@r_devops
Do you guys have any feedback on this postmortems article?

Hi everyone! My team worked with Steve McGhee from Google on this article about crafting excellent postmortems. Do you have any extra tips/feedback on the article? If you like it, please feel free to share :)

[https://www.blameless.com/improve-postmortem-with-sre-steve-mcghee/](https://www.blameless.com/improve-postmortem-with-sre-steve-mcghee/)

https://redd.it/e24ps3
@r_devops
Question About Microservices Login Auth and Microservice DB schema

I recently just started and have been playing around with microservices. and there's a few things that confuses me.

first off for context, i want to create a separate MC for Auth and User and have this db schema for User

​

user table

\---------------

id

name

email

etc

\---------------

​

user\_pass table

\---------------

id

user\_id

pass

salt

alg

etc

\---------------

​

The question i have is the login flow authentication and i have narrowed down 3 options

​

1. a browser request gets sent to -> APIGateway -> User MC for pass details then message queues -> Auth MC -> validate --> send back token

​

2. a browser request gets sent to -> APIGateway -> Auth MC -> gets details straight from db -> validate -> send back token

​

3. a browser request gets sent to -> APIGateway -> User MC -> validate with small auth code -> send back token

​

I'm planning on just doing no.2 but i've read that it's bad to share db between MCs, so is it maybe the db schema that's the problem?

Should i just make user\_pass table a table specific for Auth MC's db and have it query from there? (UserDB.user\_pass --->>> AuthDB.user\_auth)

​

I'm also planning on just making the Auth MC as a ticket checker for JWT in every request or maybe filter that in the Gateway with the exception of the login flow no.2

but that's not any of my concerns right now as i know it could be very broad, my main concern right now is the login flow.

​

So please let me know what i'm doing wrong or if something is not clear. That would be very much appreciated. Thanks in advance.

https://redd.it/e23mbl
@r_devops
These are the steps that I've taken to SSH into a remote server in a Jenkinsfile but failed. Need help!

Hello, I am new to Jenkins, and I am building a pipeline where I have to ssh into a remote server to perform some tasks. I am finding a way to ssh without typing the password. In a general environment (no Jenkins), this would be quite simple. I would have to generate a key (\`ssh-keygen\`) and put the public-key into the remote server's \`authorized\_keys\`.

However, since my goal in Jenkins is to \`ssh\` into the server, I am not able to do that. What I tried was using \`ssh-agent\`. Reading some tutorials, I was told to do something like (this is with \` withCredentials(\[sshUserPrivateKey...\`)

eval $(ssh-agent -s)
chmod 600 ./key_key2.key
ssh-add ./key_key2.key
ssh root@<remote_server> docker ps -v

where \`key\_key2.key\` is the private\_key of the remote server.

Is this the correct way to do it?

I feel like using ssh-agent is skipping the part where I add the public\_key to the remote-server's authorized\_keys, but I thought to skip that part was one of the points of using the public\_key.

&#x200B;

Any help, please?

https://redd.it/e27bcj
@r_devops
introducing devops-pipeline

I'm writing a tool to coordinate other tools traditionally used in a devops environment. It's configured as a DOT graph file. It started out as trying to represent an environment in totality by all the running of different tools. With devops-pipeline, you can represent your entire environment as the pipeline as code that is needed to deploy it fully.

[https://devops-pipeline.com](https://devops-pipeline.com)

Currently I have an example infrastructure that provisions two worker nodes that run builds via SSH, provisions 4 machines in AWS : HashiCorp Vault, Bastion, Prometheus&Grafana, Java machine. Uses an AMI pipeline to bake images.

This is the environment configuration - [https://github.com/samsquire/devops-pipeline-starter/blob/master/architecture.png](https://github.com/samsquire/devops-pipeline-starter/blob/master/architecture.png) devops-pipeline runs against the underlying graph of this picture. @ means runs on local machine, \* means manually triggered. I call attention to packer/source-ami, packer/authenticated-ami, packer/ubuntu-java

This is the pipeline code - [https://github.com/samsquire/devops-pipeline-starter/blob/master/architecture.dot](https://github.com/samsquire/devops-pipeline-starter/blob/master/architecture.dot)

This is the example infrastructure code project: [https://github.com/samsquire/devops-pipeline-starter](https://github.com/samsquire/devops-pipeline-starter)

https://redd.it/e26g03
@r_devops
Datadog Alternatives

Good recommendations for a Datadog alternative?
Need something to:

1. Monitor AWS infrastructure

2. Application Performance Monitor (APM) for Java Applications (spring boot)


Reason: DD is too expensive $(12k) a month.

My thoughts turn to Prometheus, Alertmanager and Grafana....

I am not sure about APM...


I’m interested in what the community has implemented .. or is Datadog the recommended way to go?

https://redd.it/e1zcsr
@r_devops
Ran a free 12 week DevOps Bootcamp on Twitch! Here are the numbers!

Hey everyone! I posted on here a few months back, but I ran a free 12 week DevOps bootcamp on Twitch from Aug-Oct. I absolutely consider it to have been a success and Just wanted to come share the results! These are the averages and totals from the 23 streams:


* Avg. Viewers 38
* Avg. Max Viewers 51
* Total Minutes Watched 115,350
* Total Chat Messages 5,949
* Total Minutes Streamed 3,131(52.2 hours)

Ill be making some tweaks and re-running the bootcamp in starting the second week of January. I will also be running a 12 week Python Bootcamp at the same time if anyone was looking to pick up Pyhton. The updated curriculum as well as dates will go live in the next couple of days on [https://academy.mastermnd.io](https://academy.mastermnd.io), or you can head straight over to [Twitch](https://twitch.tv/mastermndio). Thanks for making the first Bootcamp successful and I look forward to the next!

&#x200B;

P.S. If you missed the first one, All of the streams can be found at this YouTube playlist. They will only stay up until the next bootcamp, then I will replace them with the new recordings.

[https://www.youtube.com/playlist?list=PLleOCN2eBn8IBa07mO-mfUffUIz9LK6B5](https://www.youtube.com/playlist?list=PLleOCN2eBn8IBa07mO-mfUffUIz9LK6B5)

https://redd.it/e2ags6
@r_devops
Anyone do github v3 to query private repos?

I'm trying to do something like

```bash
curl -H "Authorization: token ${GIT_TOKEN}" \
https://api.github.com/repos/${GIT_OWNER}/${GIT_REPO}/README.md
```

But get this back.
```json
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
```

Obviously doing it wrong, combing through docs, tinkering, but wondering if anyone has done this before.

https://redd.it/e20sdq
@r_devops
AWS CodeDeploy + EKS

Any thoughts on when ( if ) AWS will support CodeDeploy to EKS. I know there are some hacks to making it working but it would be nice to have this supported natively.

https://redd.it/e28ngs
@r_devops
AWS CodeDeploy + EKS

Any thoughts on when ( if ) AWS will support CodeDeploy to EKS. I know there are some hacks to making it working but it would be nice to have this supported natively.

https://redd.it/e28ngs
@r_devops
Gitlab CI/CD pipeline to upload a file to GCP Bucket?

I am tasked with a scenario where I need to run a pipeline everytime someone pushes some changes to a Gitlab project.

There is one file of interest in the project repository that should be automatically uploaded to a Google Cloud Bucket.

How do I write a pipeline for this?

https://redd.it/e1xnga
@r_devops
I need some help with AppDynamics

I need to configure a health rule on AppD and need some help with it. Please reply to this post of you can help me with it

https://redd.it/e2fefq
@r_devops
Deploying to prod is currently the only way to catch some bugs. Possible to capture and replay real web traffic for replay on a dev server for testing purposes? Other options?

I work at a company with a monolithic legacy codebase. For deployments, we have a build once per week and stage to a QA server, where the build is tested (manually, though we do have some automated tests). After validation, the final stage of "testing" is to deploy the build to one of our prod servers and take real web traffic for a few minutes. The organic traffic, in combination with the live data on the servers, means that some bugs that don't appear in QA manifest in this environment, meaning that tailing the logs for errors and stack traces is currently the only way we have to catch some bugs. I've asked the devs if it's possible, whenever there's an error, to write an automated test to make sure that specific case is caught before we start to deploy, but the answer from our senior guys comes down to "it's not that simple", and the combination of traffic and persisted data on the live servers isn't feasibly replicable on a dev or qa environments.

Intuitively, this doesn't sound right to me. After all, even if you can't fake those conditions, perhaps you could capture and replay them outright? Hence my question here. Is it possible (or orthodox) to capture real-life web traffic (as well as the persisted data from the servers at that time) and replay it on the dev/build servers, whose logs we can tail or parse automatically for errors which can then be inspected, instead of having to send out a trial balloon to prod? Are there tools to do exactly this?

It's also possible I'm thinking about this in the wrong way and there's a better way to tackle this problem. We don't have a mature build/release process and I'm trying to make small changes with big impacts. Any advice is very much appreciated.

https://redd.it/e203di
@r_devops
How to deploy to any cloud using GitLab for GitOps Why multi-cloud compatibility supports a clean GitOps workflow.

Good GitOps procedure has you making a Git repository the single source of truth for all of the code. In our demonstration, there is no code that exists outside of the Git repository – with infrastructure code living in the infrastructure repo, and application code living in the application repo.


Blog: https://about.gitlab.com/blog/2019/11/18/gitops-prt-3/

Video: https://youtu.be/heQ1WY_08Tc

Code: https://gitlab.com/gitops-demo

https://redd.it/e1teyn
@r_devops
Suggest me a minialistic CI server that can be run locally and is capable of building Docker images

I am looking for a simple CI server which could be easily run locally (preferably as a docker container) which I need for testing purposes (not production ready is ok).

My requirements:

- it should be capable of building and pushing docker images
- there should be a way to execute Kuberenetes (kubectl) commands from a pipeline

https://redd.it/e2h2hz
@r_devops
Question regarding offline plugin repositories

I work in a business where we have air gapped networks without a direct connection to the internet. We are a heavy user of Atlassian products and Jenkins to name a few. A real pain in the behind is getting plugins for these without a direct pipe out to the great Internet.

We would like a solution where we host all plugins relevant for us on a local repository placed in our DMZ and can't seem to find one. I've looked into (on their website) jFrog Artifactory's remote repositories, but I can't seem to find exactly what I'm looking for. We are looking at implementing Artifactory for our build artifacts.

It would be greatly appreciated if you can share your experiences regarding this.

https://redd.it/e2e5zo
@r_devops
Urgent! Copying jobs from Cloudbees Jenkins to Ec2 Instance based Jenkins for Migration

Can someone help me out - How to copy jobs of a specific project from Cloudbees Jenkins ( using Folder Plugin) to Ec2 Instance based Jenkins ??

Our Cloudbees Jenkins has many different projects in it but I want to copy jobs of singe project to Ec2 based Jenkins

Please tell me the script or commands or how to do it ..

https://redd.it/e2dx5s
@r_devops