Reddit DevOps
273 subscribers
65 photos
32.1K links
Reddit DevOps. #devops
Thanks @reddit2telegram and @r_channels
Download Telegram
Transitioning from IT to Dev Ops

Hey guys! Currently doing my fourth year of IT Support and to be honest - I am burnt out. I have no desire to continue, looking to transition into Dev Ops. Starting to learn Python and am just looking for guidance on how to get my foot in the door? All these places I look at want "x years of experience" or this and that. It seems very hard for someone transitioning into this field to land an entry level job. With that being said, how did you land your first job in it?

https://redd.it/g5r8h3
@r_devops
Want to start a YT channel but nervous.

Hey all, I’m wanting to start a YT channel doing tutorials of various devops tools like hash ivory vault, consul, git, AWS, Anthos, k8 ect.

Just to gauge the need, who would find something like this helpful? Or am I beating a dead horse?

https://redd.it/g5qts0
@r_devops
Looking to make a Jenkins Docker Container - How do i modify it with default jobs/plugins?

Hi,

I'm looking to put together a docker container (building it from a base of the latest jenkins available lts build).

I want to modify it to include a default set of build tools like g++ etc, plugins like git plugin and then have a couple of default jobs.

What is the best way to do this? I've had a play around and can sort of get the build tools and plugins working but can't seem to get the jobs added in.

I've tried creating directories and adding my config.xml files in during the docker build process but it doesn't seem to want to play ball.

Is there a well known tutorial guide on how to do this... I've read something about using volumes to persist data... is this the way to go?

https://redd.it/g5pp7o
@r_devops
Building Infrastructure Components

Hello,

I am curious on how the process is for you to decide which technologies are you choosing in order to build an infrastructure.

Imagine you need to build a platform, so you need backend (DBs, server side logic, api brokers) and frontend. How do you search/choose which languages and frameworks are you going to use?

I will maybe need to upgrade an infrastructure or build one, so I am curious on how you guys do it.

​

Thank you.

https://redd.it/g5ghub
@r_devops
Creating a Jenkins freestyle project to build after a PR is merged into master (specific branch)

Hey guys,

Going out on a whim here, but would like to know if this is possible? Most of the documentation or stuff on Stackoverflow regard Jenkins building when a PR is pushed.

Is there a way to ignore that portion and only build after that PR is merged?

e.g. we have the master and test branch. I checkout to the test branch and make changes and then I would submit a PR. No build runs (or at least for this specific Job). My PR gets approved, I merge to master and then my build runs.

https://redd.it/g5vsan
@r_devops
Help with Kubernetes

Hi I new to Kubernetes and i have to deploy to a cluster.

My manager has given me a config file but i do not understand how to deploy using that:

​

This is the config file

apiVersion: v1
clusters:
\- cluster:
certificate-authority-data: <data-1>
server: <api.url>
name: <url>
contexts:
\- context:
cluster: <url>
namespace: default
user: <url>
name: <url>
current-context: <url>
kind: Config
preferences: {}
users:
\- name: <url>
user:
client-certificate-data: <data-2>
client-key-data: <data-4>
password: <password>
username: <username>
\- name: <url>-basic-auth
user:
password: <password>
username: <username>

https://redd.it/g5val8
@r_devops
( HELP) Can't deploy my MERN App to Heroku/AWS. Serving static files with Express isn't working.

I am having such a difficult time deploying my React app for the past 2 weeks. I tried both Heroku and AWS. My main issue is that my web app is left with a blank screen when my node server sends React static files to the browser. The console reads Unexpected token '<'" for chunk.js. My app only works locally if I run both my client and backend servers separately. However, I know for production, I must serve static files. I feel like I saw every tutorial/forum under the sun but cannot figure out my issue.

I made a concise post here with a little more details. I would really appreciate your help, I don't want to give up on this since this is my first React app. I'm usually fine when using plain old HTML and CSS, but this is a different scenario. Thank you!

[https://stackoverflow.com/questions/61242648/why-is-my-react-app-not-displaying-when-i-serve-an-index-html-file-with-express](https://stackoverflow.com/questions/61242648/why-is-my-react-app-not-displaying-when-i-serve-an-index-html-file-with-express)

https://redd.it/g5tged
@r_devops
How to expose kubernetes dashboard to all users within my vpc using a static DNS in AWS EKS ?

I want to expose kubernetes dashboard to multiple users who have access to my vpc, i've seen some examples using internal load balancer with external DNS but i just want to know if there are more suggestions.

https://redd.it/g5id3x
@r_devops
Splitting out docker and kubernetes manifests from main source code? Production design patterns

Hi Folks,

I'm wondering what the best production design patterns are surrounding docker and kubernetes manifest files. Are you splitting out docker/kubernetes related manifests from your project's source code in git? So, two separate projects, with their own pipelines? Or is everything in a single repo, with a larger pipeline?

 

I'm of two minds, personally. If we have a single project, everything seems to get lost, and the structure is difficult to keep on top of. Developers do what they want, put projects anywhere, and it makes it difficult to keep track of changes etc.

 

On the other hand, having to trigger downstream pipelines after compiling / testing and storing artifacts is also a hassle and depending on your ci/cd tooling, can be a little tricky and cumbersome to keep track of.

 

What are you folks doing?

https://redd.it/g5fphv
@r_devops
Companies that provide multi-cloud automation services | Help with university task

Hello guys,

I am studying business management and I have an elective course called "It Infrastructure management". I have an assignment, which is called "The benefits of multi-cloud automation services" and in one part I thought about comparing several companies that provides this service.


I came up with information from this link: [https://searchcloudcomputing.techtarget.com/definition/cloud-automation](https://searchcloudcomputing.techtarget.com/definition/cloud-automation) and it says that "There is no single cloud automation tool, platform or framework. A myriad of different offerings are available, ranging from on-premises tools for private clouds to hosted services from public cloud providers.".


However, this publication was updated on 2017 of August. I thought that there are new established companies or start-ups, which provide multi-cloud automation.

My question would be, do you know any IT companies that provide multi-cloud automation services? Or there are still no companies that could provide such service and I should skip this part in my assignment?

Thanks in advance for any help!

https://redd.it/g5lzal
@r_devops
Service discovery nightmare

My company's idea of service discovery for both internal and external-facing services is to throw a couple thousand IPs on to a public hosted zone on Route 53. There is no coordination among teams regarding who adds and deletes records, leading to quite a bit of mess. Also, there are no health checks. From a security standpoint, our biggest concern is subdomain takeover due to old records never being cleaned up.


We are almost exclusively deployed on AWS, federated across several dozen accounts. There are many cross-account services, meaning service discovery has to work across accounts.

Our team wants to implement some centralized service discovery, allowing other teams programmatic access to update records that are relevant only for their team. We are leaning towards AWS Cloud Map, but we're not sure how to expose private records in one account to the others without using some DNS relay system with bind / CoreDNS.


Alternatively, if a completely managed solution can't give us what we need, we considered using Consul.


Any recommendations for / against? Other suggestions?

https://redd.it/g5c8ev
@r_devops
replacing certain lines in files depending on dev/prod environment?

I'm working on setting up multiple tools automatically (with containers) and there are quite a few configuration files to manage.

We have a testing/development environment and a production environment, so I'm wondering if there is a way to replace certain lines in files e.g. a url for dev/prod, maybe some permissions, etc.

I'm thinking of someting like Angular's environment.ts since that's the background i come from. Is there a tool for something like this just with normal files?

EDIT: If anyone ends up stumbling upon this, ansible's template module/jinja2 is a really good solution to do this

https://redd.it/g5erc2
@r_devops
How to run Python Selenium with Chrome GUI on Ubuntu Container with Browserfull (NOT Browserless) on Docker on a WIndows 10 host PC?

How to run Python Selenium with Chrome GUI on Ubuntu Container with Browserfull (NOT Browserless) on Docker on a WIndows 10 host PC?

I want to run **Chrome Browser** with **Selenium Python** from my **Ubuntu container** on my **Windows 10 Host** PC. I **DO NOT** want to run *headless browser*.

I want to change my **Dockerfile** to use Chrome browser with Selenium Python.

I have tried *downloading Chromedriver*, but it is failing.

I have tried out all the other suggestions from Google and Stackoverflow, but nothing is working. Any suggestions?

The following is my Dockerfile:

FROM ubuntu:latest RUN apt-get update --fix-missing; \ apt-get install -y software-properties-common; \ rm -rf /var/lib/apt/lists/* ; \ add-apt-repository -y ppa:deadsnakes/ppa; \ apt update -y; apt upgrade -y; \ apt install -y python3.6; \ apt install -y python3-pip; \ yes | python3 -m pip install --upgrade pip; \ yes | python3 -m pip install virtualenv pip; \ apt-get install -y python3-venv; \ yes | python3 -m venv my_py_venv; \ add-apt-repository -y ppa:git-core/ppa; \ apt update -y ; \ apt install -y git; \ yes | python3 -m pip install --upgrade pip; \ yes | python3 -m pip install virtualenv; \ source my_py_venv/bin/activate; \ yes | pip3 install wheel; \ yes | pip3 install selenium; \ yes | pip3 install git+https://github.com/behave/behave; \ yes | pip3 install allure-behave; rm -rf /var/lib/apt/lists/*;

I have downloaded the ChromeDriver ([https://chromedriver.storage.googleapis.com/index.html?path=83.0.4103.14/](https://chromedriver.storage.googleapis.com/index.html?path=83.0.4103.14/)) but I am not sure which version to use (*chromedriver\_win32.zip* OR *chromedriver\_linux64.zip*).

And while instantiating the Chrome Browser instance, should I use Windows Directory Syntax ('\\') or Linux Directory Syntax ('/') in the code below:

driver = webdriver.Chrome('/steps/chromedriver')

Thank you for your time and suggestions.

&#x200B;

[https://stackoverflow.com/questions/61341084/how-to-run-python-selenium-with-chrome-gui-on-ubuntu-container-with-browserfull](https://stackoverflow.com/questions/61341084/how-to-run-python-selenium-with-chrome-gui-on-ubuntu-container-with-browserfull)

https://redd.it/g5dfn2
@r_devops
Hi, I want to clone specific folder using Jenkins.

Hello fellow redditors, I'm working on one pipeline and because of space issue on server I have to clone one specific folder using Jenkins. I'm using Git SCM plugin to generate pipeline syntax. Please help!

Thank you!

https://redd.it/g5bu0b
@r_devops
What tools do you use along with Ansible Tower to run initial unit testing?

I'm having some trouble coming up with the "right" tool to use. I'd like to test code that is submitted to my development branch for syntax, errors, as well as run with --check by using either a setting or variable in Ansible Tower. The goal here is just on initial commits to the staging branch, as I'd like each person submitting changes to verify their own code against Ansible Tower before initiating a merge request to the staging / dev environment.

https://redd.it/g604n2
@r_devops
Single click putty session

Hey Guys,

Hope everyone is doing good. I recently started learning about DevOps and following an online class. The videos are recorded and I can't contact the instructor.Now, I've created an instance in my AWS console, created a .pem key, converted it into .ppk using putty gen and launching a SSH shell using putty.

I want to know is there any way I can launch this session with a single click than copying the ipaddress of my instance and loading the .ppk everytime? I don't even know if it's possible, so excuse me if this is just a silly doubt.

Thanks in advance. Namaste!

https://redd.it/g5zrxm
@r_devops
Doing CI/CD for ASP.Net using containers?

Does anyone have experience with a CI/CD pipeline for [ASP.Net](https://ASP.Net) projects using Windows containers? We are mainly a Linux/PHP joint, but have lately also aquired some companies that also do .Net development.

We currently have setup a build agent (we run Bamboo) that has nuget and Visual Studio 2017 installed. Now they also want to build with newer .Net frameworks and that's giving us version conflicts (wrong version of msbuild etc.). We managed to sort that out, but it's not very flexible and I'm pretty sure we'll run into problems when the next version is there. On our PHP projects, we have a set of containers that each have their own specific PHP or NodeJS version, which makes switching between versions very easy (just switch containers and done). Is something like that possible for Windows as well?

Most deployment workflows are quite simple. They do nuget restore, build the solution and sometimes a nuget pack but that's basically it. I think the main problem right now is that they are relying on devenv.exe to actually build the solutions, which requires Visual Studio to be installed on the machine. A lot of the projects they are working with are not yet compatible or sufficiently tested on DotNet Core either (like older versions of Umbraco), so we can't just use that on Linux containers.

Any leads on where to start are more than welcome. Most resources I find online are focussed on running apps in containers (not using them for building) or tied to Azure. We basically just need to feed it a folder with the project, run some commands and hand the result over to the deployment part of the pipeline.

https://redd.it/g5wywf
@r_devops
How to pass values to serverless template without displaying them in the resulting cloudformation stack?

At my work we are using serverless to create all AWS resources. I want to create some parameter store parameters, is there a way to pass these values without displaying them in the template? I want to do something similar to cloudformation parameters with “NoEcho” option.

https://redd.it/g5yr02
@r_devops
Shared hosting microservices and reverse proxy

Hi there, I am trying to set up some microservices on a new EC2 server. Essentially we are setting up a SAAS product, but we want to use shared hosting for the software for different clients. Because of this, I need to route network traffic through a reverse proxy to make sure network requests reach the correct containers.

It is worth mentioning that at the moment, the infastructure for the different clients are not seperated by any VM or container, each service just operates in its own docker container. Each service atm also has it's own nginx instance at the moment, because that makes development much easier. I am considering moving to having only one nginx container per client, that each service uses. I assume this will be better long term.

Keeping docker containers in networks should allow me to dynamically route requests using the container name instead of the static IP, which might change. View image 1 for a picture of what I mean.

The reverse proxy works when I set an upstream like so:

http {
upstream storage {
server clienta_nginx_1:8000;
server clientb_nginx_1:8001;
}
}

However, nginx cannot boot if any of the declared upstreams are down for some reason, which prevents ALL services from being accessed when only one is down. This is clearly not allowable. To attempt to circumnavigate the issue, I instead use a variable syntax, using the nginx resolver parameter and the docker local DNS resolver like this:

server {
resolver 127.0.0.11 valid=5s ipv6=off;
set $client clienta_nginx_1:8000;
proxy_pass https://$client;
}

This resolves the name of the container into an IP address and attempts to pass the request through to the container, but gets this error:

6#6: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.24.0.1, server: clienta.example.com, request: "POST /files HTTP/1.1", upstream:
"https://172.24.0.3:8000/files", host: "clienta.example.com:80

I should also add, I can connect to the service just fine if I try and access it through postman on port 8000, which means that the port is correctly exposed to the container. It just gets refused when I attempt to access it through the reverse proxy. And the two nginx's are both hosted in docker containers, that are both connected to an external docker network.

I suppose I have two questions, do you have any recommendations or suggestions for my infrastructure design? And also, can anyone explain to me why this doesn't work and how to fix this error? Please find supporting documents and images below as well.

[Image 1](https://imgur.com/a/GjgqFxQ)

[nginx.conf](https://pastebin.com/yfeAQzFV)

https://redd.it/g5x5xm
@r_devops
jsonnet IDE?

So I wanted to mange my Grafana dashboards as code and found [grafonnet-lib](https://github.com/grafana/grafonnet-lib) which looked promising.

After reading about jsonnet and getting all excited I quickly realized there is no full fledged IDE for jsonnet, sure some IDEs have plugins (intellij, atom, vscode), but not one provides a complete set of feature like autocomplete, goto definition, code folding, vscode comes close but the plugin hasn't been maintained since March 2018, and I refuse to work with vscode/atom since they feel like toys compared to Intellij products.

How do people mange their jsonnet code? I want amazed to find that a tool release in 2014 still doesn't have decent integration with popular IDEs.

https://redd.it/g5yeeu
@r_devops