Issue with login to ECR inside Jenkins build agent
I am using Jenkins to build something and I want it to run a custom image that is hosted on ECR. The keys have admin access (testing only - will restrict later) when I go to put it in I get a 401 error seen below. I have also included how I have my build agent set in my pipeline. I was hoping someone solved this already, google has just turned up the 'I figured it out thanks every' posts.
​
pipeline agent
agent {
docker {
image '<id>.dkr.ecr.us-east-1.amazonaws.com/node_build:latest'
registryUrl 'https://<id>.dkr.ecr.us-east-1.amazonaws.com/node_build'
registryCredentialsId 'aws-creds'
}
}
​
Error message seen in Jenkins
Running on Jenkins in /var/lib/jenkins/workspace/Deploy UI
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u <Access key> -p ******** https://<id>.dkr.ecr.us-east-1.amazonaws.com/node_build
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: login attempt to https://<id>.dkr.ecr.us-east-1.amazonaws.com/v2/ failed with status: 401 Unauthorized
https://redd.it/dvh4rk
@r_devops
I am using Jenkins to build something and I want it to run a custom image that is hosted on ECR. The keys have admin access (testing only - will restrict later) when I go to put it in I get a 401 error seen below. I have also included how I have my build agent set in my pipeline. I was hoping someone solved this already, google has just turned up the 'I figured it out thanks every' posts.
​
pipeline agent
agent {
docker {
image '<id>.dkr.ecr.us-east-1.amazonaws.com/node_build:latest'
registryUrl 'https://<id>.dkr.ecr.us-east-1.amazonaws.com/node_build'
registryCredentialsId 'aws-creds'
}
}
​
Error message seen in Jenkins
Running on Jenkins in /var/lib/jenkins/workspace/Deploy UI
[Pipeline] {
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withDockerRegistry
$ docker login -u <Access key> -p ******** https://<id>.dkr.ecr.us-east-1.amazonaws.com/node_build
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error response from daemon: login attempt to https://<id>.dkr.ecr.us-east-1.amazonaws.com/v2/ failed with status: 401 Unauthorized
https://redd.it/dvh4rk
@r_devops
Testing Packer Images
Is there a better way to test Packer builds beyond the fact that there were no errors in the build process? It doesn't look like Packer has anything for hooking some kind of validation of the system before finishing the build, so I'm not sure how or where it would happen. Has anyone ever done something like this?
https://redd.it/dxoelb
@r_devops
Is there a better way to test Packer builds beyond the fact that there were no errors in the build process? It doesn't look like Packer has anything for hooking some kind of validation of the system before finishing the build, so I'm not sure how or where it would happen. Has anyone ever done something like this?
https://redd.it/dxoelb
@r_devops
reddit
Testing Packer Images
Is there a better way to test Packer builds beyond the fact that there were no errors in the build process? It doesn't look like Packer has...
Are there new questions/tests you're hearing in interviews you weren't getting a year ago?
Hey, I'm pretty early in my devops career and have just been getting thrashed in my last couple interviews. Most of the 'here are questions you need to prep for' articles are a year old at best and I've read a ton of them.
Any newer ones you might be asking your candidates or are hearing yourselves that you didn't have a year ago?
https://redd.it/dxo6pt
@r_devops
Hey, I'm pretty early in my devops career and have just been getting thrashed in my last couple interviews. Most of the 'here are questions you need to prep for' articles are a year old at best and I've read a ton of them.
Any newer ones you might be asking your candidates or are hearing yourselves that you didn't have a year ago?
https://redd.it/dxo6pt
@r_devops
reddit
Are there new questions/tests you're hearing in interviews you...
Hey, I'm pretty early in my devops career and have just been getting thrashed in my last couple interviews. Most of the 'here are questions you...
Lambda function not being triggered by SNS notification
I have an application that does some processing which puts out a SNS notification depending on the results. The application works fine - I can see the console log of the notification being sent and see in cloudwatch that none are failing - however I am unable to get a lambda to run once the notification is sent out. There is an existing subscription to the SNS from the Lambda which was created using the serverless framework and I have confirmed in the console that a subscription exists.
​
What are some steps I can take to troublesoot this? I'm a bit lost today. Also any ideas on cause would be great
https://redd.it/dxq0ce
@r_devops
I have an application that does some processing which puts out a SNS notification depending on the results. The application works fine - I can see the console log of the notification being sent and see in cloudwatch that none are failing - however I am unable to get a lambda to run once the notification is sent out. There is an existing subscription to the SNS from the Lambda which was created using the serverless framework and I have confirmed in the console that a subscription exists.
​
What are some steps I can take to troublesoot this? I'm a bit lost today. Also any ideas on cause would be great
https://redd.it/dxq0ce
@r_devops
reddit
Lambda function not being triggered by SNS notification
I have an application that does some processing which puts out a SNS notification depending on the results. The application works fine - I can see...
protobox - gRPC dependency management
We needed a way to manage the protobuf dependencies in our projects were i work, so we made a tool for it. Check it out and give it a star if it tickles your fancy.
[https://github.com/UNIwise/protobox](https://github.com/UNIwise/protobox)
https://redd.it/dxmggt
@r_devops
We needed a way to manage the protobuf dependencies in our projects were i work, so we made a tool for it. Check it out and give it a star if it tickles your fancy.
[https://github.com/UNIwise/protobox](https://github.com/UNIwise/protobox)
https://redd.it/dxmggt
@r_devops
GitHub
UNIwise/protobox
gRPC source generation and dependency management like a good boy - UNIwise/protobox
How do you guys manage secrets and API codes in github ?
Are you using any specific tool such as vault or console or perhaps base64 to do it?
What do you think best way to do this ?
https://redd.it/dxksw8
@r_devops
Are you using any specific tool such as vault or console or perhaps base64 to do it?
What do you think best way to do this ?
https://redd.it/dxksw8
@r_devops
reddit
How do you guys manage secrets and API codes in github ?
Are you using any specific tool such as vault or console or perhaps base64 to do it? What do you think best way to do this ?
Video-game programmer (c#) getting tired of my dayjob looking for the right path
I work as a bartender part-time as I pursue making my dream projects. Bartending has been fun/lucrative for a few years but I'm getting really tired of people. My friend recommended I get AWS certified and see where that takes me. My ultimate desire is to find a half-decent paying job that is a bit more cerebral than bartending and still allows me enough time to program. Any help is very appreciated.
https://redd.it/dxvqps
@r_devops
I work as a bartender part-time as I pursue making my dream projects. Bartending has been fun/lucrative for a few years but I'm getting really tired of people. My friend recommended I get AWS certified and see where that takes me. My ultimate desire is to find a half-decent paying job that is a bit more cerebral than bartending and still allows me enough time to program. Any help is very appreciated.
https://redd.it/dxvqps
@r_devops
reddit
Video-game programmer (c#) getting tired of my dayjob looking for...
I work as a bartender part-time as I pursue making my dream projects. Bartending has been fun/lucrative for a few years but I'm getting really...
Unrecognized services in Puppet Enterprise
I have tried to run the following:
puppet resource service puppetdb ensure=running
and receive the error
Error: Could not start Service\[puppetdb\]: Execution of '/sbin/service puppet start' returned 1: puppetdb: unrecognized service
service { 'puppetdb': ensure => 'stopped', }
I am also running into the same issue with puppetserver. I suspect this may be a certification issue, but wanted to run it by others.
https://redd.it/dxxpsd
@r_devops
I have tried to run the following:
puppet resource service puppetdb ensure=running
and receive the error
Error: Could not start Service\[puppetdb\]: Execution of '/sbin/service puppet start' returned 1: puppetdb: unrecognized service
service { 'puppetdb': ensure => 'stopped', }
I am also running into the same issue with puppetserver. I suspect this may be a certification issue, but wanted to run it by others.
https://redd.it/dxxpsd
@r_devops
reddit
Unrecognized services in Puppet Enterprise
I have tried to run the following: puppet resource service puppetdb ensure=running and receive the error Error: Could not start...
AWS ECS Fargate and security ?paranoia? - interview question
I have been a fan of Fargate since it launched, mostly because I like the idea of not having to manage any EC2 instances AND being lazy/reluctant to learn Kubernetes. I had an interview with one of the media companies and one of their senior infra/systems engineers asked me what is my opinion about security of Fargate from the perspective of not being able to "see" where containers are running and if someone in AWS had access to exec into them and lets say see all the secrets that are exposed as environment variables inside of those containers.
I honestly never thought about this and didn't know what to say so I just winged it and said that I think in my opinion the same question can be asked for any managed service, including EC2. There are contracts between us and cloud providers and when you signed up for a fully managed compute services such as Fargate (or any service at all) you already took into consideration and accepted those risks. Also, according to my understanding of AWS shared responsibility model, such incidents would mostly fall under AWS belt.
How would you have answered a similar question? Can we trust cloud providers? - IMO yes! that's the biggest cost and risk of cloud computing which clearly many are willing to pay.
Btw, I passed the interview - but didn't continue with the further process.
https://redd.it/dvk25k
@r_devops
I have been a fan of Fargate since it launched, mostly because I like the idea of not having to manage any EC2 instances AND being lazy/reluctant to learn Kubernetes. I had an interview with one of the media companies and one of their senior infra/systems engineers asked me what is my opinion about security of Fargate from the perspective of not being able to "see" where containers are running and if someone in AWS had access to exec into them and lets say see all the secrets that are exposed as environment variables inside of those containers.
I honestly never thought about this and didn't know what to say so I just winged it and said that I think in my opinion the same question can be asked for any managed service, including EC2. There are contracts between us and cloud providers and when you signed up for a fully managed compute services such as Fargate (or any service at all) you already took into consideration and accepted those risks. Also, according to my understanding of AWS shared responsibility model, such incidents would mostly fall under AWS belt.
How would you have answered a similar question? Can we trust cloud providers? - IMO yes! that's the biggest cost and risk of cloud computing which clearly many are willing to pay.
Btw, I passed the interview - but didn't continue with the further process.
https://redd.it/dvk25k
@r_devops
reddit
AWS ECS Fargate and security ?paranoia? - interview question
I have been a fan of Fargate since it launched, mostly because I like the idea of not having to manage any EC2 instances AND being lazy/reluctant...
Build and maybe deployment pipeline for hobby projects?
I'm a developer and mainly do development in Nim on MacOS and deploy to linux in the cloud. Nim generates a native executable using GCC. At the moment I have only a couple of artifacts - a crawler and a web server, but I expect the number of artifacts and instances of them to grow over time. At some point I'll need to add a queue and have multiple crawlers pulling jobs assignments off it. They use a hosted database. The code is all in github.
Since Nim generates native executables - which can't be shared between MacOS and Linux, I'm currently manually (well via scripts) pushing source code to a server and compiling it there before deploying it.
Any suggestions on how you'd set up a build pipeline for something like this? I need something simple and easy to maintain since it's only me. A nice bonus would be automatic deployments as well. I have experience with ansible and have only played around with Docker and k8s. I'm willing to learn about whatever tool but there are so many out there that I don't have the time to learn all of them. I need a narrow focus.
https://redd.it/dvigp4
@r_devops
I'm a developer and mainly do development in Nim on MacOS and deploy to linux in the cloud. Nim generates a native executable using GCC. At the moment I have only a couple of artifacts - a crawler and a web server, but I expect the number of artifacts and instances of them to grow over time. At some point I'll need to add a queue and have multiple crawlers pulling jobs assignments off it. They use a hosted database. The code is all in github.
Since Nim generates native executables - which can't be shared between MacOS and Linux, I'm currently manually (well via scripts) pushing source code to a server and compiling it there before deploying it.
Any suggestions on how you'd set up a build pipeline for something like this? I need something simple and easy to maintain since it's only me. A nice bonus would be automatic deployments as well. I have experience with ansible and have only played around with Docker and k8s. I'm willing to learn about whatever tool but there are so many out there that I don't have the time to learn all of them. I need a narrow focus.
https://redd.it/dvigp4
@r_devops
reddit
Build and maybe deployment pipeline for hobby projects?
I'm a developer and mainly do development in Nim on MacOS and deploy to linux in the cloud. Nim generates a native executable using GCC. At the...
Docker, Git, Jenkins and local image
Hi, we use Jenkins to build our docker container starting from a dockerfile pulled from Git (and other files). I have to build my container by dockerfile, i cannot modify Jenkins job. Docker build is executed by Jenkins, in my dockerfile i use a base image from docker hub but i want to export and use it locally (Reading from Jenkins workspace, stored in the same GIT repo of dockerfile ). Is there any way or workaround to start my dockerfile like "FROM local/directory" ? My server doesn't have access to internet and to docker hub.
https://redd.it/dvgl4g
@r_devops
Hi, we use Jenkins to build our docker container starting from a dockerfile pulled from Git (and other files). I have to build my container by dockerfile, i cannot modify Jenkins job. Docker build is executed by Jenkins, in my dockerfile i use a base image from docker hub but i want to export and use it locally (Reading from Jenkins workspace, stored in the same GIT repo of dockerfile ). Is there any way or workaround to start my dockerfile like "FROM local/directory" ? My server doesn't have access to internet and to docker hub.
https://redd.it/dvgl4g
@r_devops
reddit
Docker, Git, Jenkins and local image
Hi, we use Jenkins to build our docker container starting from a dockerfile pulled from Git (and other files). I have to build my container by...
Tutorial: Run NixOS using Vagrant
I've recently been experimenting with [NixOS](https://nixos.org/) and I've found it really interesting, so I wrote a tutorial on how to install and run NixOS using Vagrant. Includes instructions for running on both macOS and Ubuntu, but should work on most operating systems.
Maybe someone else will find NixOS as interesting as I have. :) I appreciate any and all feedback on the tutorial and the blog. Thanks! :)
https://lunar.computer/posts/vagrant-nixos/
https://redd.it/dveole
@r_devops
I've recently been experimenting with [NixOS](https://nixos.org/) and I've found it really interesting, so I wrote a tutorial on how to install and run NixOS using Vagrant. Includes instructions for running on both macOS and Ubuntu, but should work on most operating systems.
Maybe someone else will find NixOS as interesting as I have. :) I appreciate any and all feedback on the tutorial and the blog. Thanks! :)
https://lunar.computer/posts/vagrant-nixos/
https://redd.it/dveole
@r_devops
Run NixOS using Vagrant
Run NixOS using Vagrant :: LUNAR COMPUTER — Tech Blog and Tutorials
In this tutorial we’ll create a NixOS virtual machine using Vagrant. This setup can be useful to setup an environment for learning NixOS. NixOS is a Linux distribution which is declaratively configured using a specification written in the Nix expression language…
Has anyone here used NS1 for DNS service?
Reviewing providers and I had never heard of this one before.
https://ns1.com/
Thanks
https://redd.it/dv8z8t
@r_devops
Reviewing providers and I had never heard of this one before.
https://ns1.com/
Thanks
https://redd.it/dv8z8t
@r_devops
Ibm
IBM NS1 Connect
IBM NS1 Connect provides managed authoritative DNS with anycast routing and automated failover to reduce latency, improve resilience and keep apps available.
Deprecating Terraform 0.11
[Time to upgrade and move away!](https://www.hashicorp.com/blog/deprecating-terraform-0-11-support-in-terraform-providers/)
https://redd.it/dy4mye
@r_devops
[Time to upgrade and move away!](https://www.hashicorp.com/blog/deprecating-terraform-0-11-support-in-terraform-providers/)
https://redd.it/dy4mye
@r_devops
Demo app to show how Hashicorp Packer, Ansible, Chef Inspec and Terraform can be used together
I created this small demo app to show how Hashicorp Packer, Ansible, Chef Inspec and Terraform can be used together to build, test and deploy an app in to production on AWS.
It works by using Packer to create an AMI. Ansible is used to install Nginx on the server and Inspec is used to test the service is installed and running. Terraform is then used to create a VPC, subnets, security group and an EC2 instance from the base AMI.
Each of these steps can be expanded upon to add more functionality. Hopefully this is useful example to show these tools working together. Here is the source on Github [https://github.com/gordonmurray/packer\_ansible\_inspec\_terraform\_aws](https://github.com/gordonmurray/packer_ansible_inspec_terraform_aws)
https://redd.it/dy59v0
@r_devops
I created this small demo app to show how Hashicorp Packer, Ansible, Chef Inspec and Terraform can be used together to build, test and deploy an app in to production on AWS.
It works by using Packer to create an AMI. Ansible is used to install Nginx on the server and Inspec is used to test the service is installed and running. Terraform is then used to create a VPC, subnets, security group and an EC2 instance from the base AMI.
Each of these steps can be expanded upon to add more functionality. Hopefully this is useful example to show these tools working together. Here is the source on Github [https://github.com/gordonmurray/packer\_ansible\_inspec\_terraform\_aws](https://github.com/gordonmurray/packer_ansible_inspec_terraform_aws)
https://redd.it/dy59v0
@r_devops
Sonatype getting acquired by Private Equity
Just saw the news - I am a little baffled by how much interest PE is showing in open source companies ( I think Travis also got acquired by PE).
You would think that companies in such a fast changing space would not be ideal for PE. Companies that are sub scale, not very profitable, have very open culture, need continued investment - pretty much opposite to PE firms (Toys r us, Perforce etc).
I think jFrog is the biggest winner in all of this. Wonder what other people think about this?
https://redd.it/dy5oqz
@r_devops
Just saw the news - I am a little baffled by how much interest PE is showing in open source companies ( I think Travis also got acquired by PE).
You would think that companies in such a fast changing space would not be ideal for PE. Companies that are sub scale, not very profitable, have very open culture, need continued investment - pretty much opposite to PE firms (Toys r us, Perforce etc).
I think jFrog is the biggest winner in all of this. Wonder what other people think about this?
https://redd.it/dy5oqz
@r_devops
reddit
Sonatype getting acquired by Private Equity
Just saw the news - I am a little baffled by how much interest PE is showing in open source companies ( I think Travis also got acquired by PE)....
Is a raspberry pi a good platform for learning docker?
Hi all.
Pretty fresh in the devops space. Just passed my AWS Certified Cloud Practitioner test on Wednesday, and looking to continue to build on my knowledge. I figured docker is a logical next step.
Would a raspberry pi be a decent platform to play around with linux containers, or do I need more powerful hardware? I'm not looking to do anything crazy. Just have like one apache web container and one mysql container (i think i said that right). Just trying to get my hands dirty.
I have fairly limited linux knowledge, but I do have some enterprise experience patching/updating Oracle Linux and MySql.
Thanks!
https://redd.it/dy5zt9
@r_devops
Hi all.
Pretty fresh in the devops space. Just passed my AWS Certified Cloud Practitioner test on Wednesday, and looking to continue to build on my knowledge. I figured docker is a logical next step.
Would a raspberry pi be a decent platform to play around with linux containers, or do I need more powerful hardware? I'm not looking to do anything crazy. Just have like one apache web container and one mysql container (i think i said that right). Just trying to get my hands dirty.
I have fairly limited linux knowledge, but I do have some enterprise experience patching/updating Oracle Linux and MySql.
Thanks!
https://redd.it/dy5zt9
@r_devops
reddit
Is a raspberry pi a good platform for learning docker?
Hi all. Pretty fresh in the devops space. Just passed my AWS Certified Cloud Practitioner test on Wednesday, and looking to continue to build on...
Using Datadog just for centralized logging?
I'm at a pretty small shop and we generate \~3GB (120mil events)/mo, which at Datadog would cost $230 for 15-day retention...but with \~100 hosts it looks like you're *required* to pay for DD's infra management at $18/host? So it would be a $1800/mo charge just to turn on Datadog, then an extra $230/mo to add logs?
For comparison 3GB/mo is $108\*3 at Sumo Logic, no infra monitoring fees.
Anyone else use Datadog just for outsourced log management?
https://redd.it/dybghe
@r_devops
I'm at a pretty small shop and we generate \~3GB (120mil events)/mo, which at Datadog would cost $230 for 15-day retention...but with \~100 hosts it looks like you're *required* to pay for DD's infra management at $18/host? So it would be a $1800/mo charge just to turn on Datadog, then an extra $230/mo to add logs?
For comparison 3GB/mo is $108\*3 at Sumo Logic, no infra monitoring fees.
Anyone else use Datadog just for outsourced log management?
https://redd.it/dybghe
@r_devops
reddit
Using Datadog just for centralized logging?
I'm at a pretty small shop and we generate \~3GB (120mil events)/mo, which at Datadog would cost $230 for 15-day retention...but with \~100 hosts...
Gitlab integrated with Phabricator - Protected Branches (push to master)
Hi everyone,
I'm not entirely sure if this is the right place to post, please let me know if there's somewhere else more relevant.
So I'm in a project where we use Phabricator for Code Reviews and Gitlab to host the project. As it is right now, once the code has been approved, one can 'arc land --onto master' and push to master from Phabricator. As of now, the master branch is protected on Gitlab but everyone has push permissions. When I set it to no one, pushing from Phabricator becomes impossible.
Is there any way to ensure that no one can push directly to master in Gitlab, but can from Phabricator (onde the review is approved)?
https://redd.it/dy31fd
@r_devops
Hi everyone,
I'm not entirely sure if this is the right place to post, please let me know if there's somewhere else more relevant.
So I'm in a project where we use Phabricator for Code Reviews and Gitlab to host the project. As it is right now, once the code has been approved, one can 'arc land --onto master' and push to master from Phabricator. As of now, the master branch is protected on Gitlab but everyone has push permissions. When I set it to no one, pushing from Phabricator becomes impossible.
Is there any way to ensure that no one can push directly to master in Gitlab, but can from Phabricator (onde the review is approved)?
https://redd.it/dy31fd
@r_devops
reddit
Gitlab integrated with Phabricator - Protected Branches (push to...
Hi everyone, I'm not entirely sure if this is the right place to post, please let me know if there's somewhere else more relevant. So I'm in a...