Jenkins declarative pipeline
Hi all.. am having issue with removing the word before / in my declarative pipeline
But it works in my linux command
Test = "${BRANCH}."+"${BUILD_NUMBER}"
currentBuild.displayName = echo '$Test' | awk -F'/' '{print $NF}'
When I try to include in the declarative pipeline it shows this error
groovy.lang.MissingPropertyException: No such property: awk for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)
at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:353)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:357)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.run(WorkflowScript:74)
Kindly help me to resolve this issue... Thanks in advance.
https://redd.it/l3w5ck
@r_devops
Hi all.. am having issue with removing the word before / in my declarative pipeline
But it works in my linux command
Test = "${BRANCH}."+"${BUILD_NUMBER}"
currentBuild.displayName = echo '$Test' | awk -F'/' '{print $NF}'
When I try to include in the declarative pipeline it shows this error
groovy.lang.MissingPropertyException: No such property: awk for class: groovy.lang.Binding
at groovy.lang.Binding.getVariable(Binding.java:63)
at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:270)
at org.kohsuke.groovy.sandbox.impl.Checker$7.call(Checker.java:353)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:357)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
at org.kohsuke.groovy.sandbox.impl.Checker.checkedGetProperty(Checker.java:333)
at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.getProperty(SandboxInvoker.java:29)
at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawGet(PropertyAccessBlock.java:20)
at WorkflowScript.run(WorkflowScript:74)
Kindly help me to resolve this issue... Thanks in advance.
https://redd.it/l3w5ck
@r_devops
reddit
Jenkins declarative pipeline
Hi all.. am having issue with removing the word before / in my declarative pipeline But it works in my linux command Test =...
CheatSheet for people studying for CKA - Certified K8s Administrator
Just pass my CKA exam so I gathered some useful commands, tips and shenanigans that are needed to pass the certification exam. Thought that might be useful for people preparing for CKA. Have a look: https://medium.com/faun/cka-kubernetes-certified-administrator-cheatsheet-9cb8c04a7e9e
https://redd.it/l3xqtm
@r_devops
Just pass my CKA exam so I gathered some useful commands, tips and shenanigans that are needed to pass the certification exam. Thought that might be useful for people preparing for CKA. Have a look: https://medium.com/faun/cka-kubernetes-certified-administrator-cheatsheet-9cb8c04a7e9e
https://redd.it/l3xqtm
@r_devops
Medium
CKA — Kubernetes Certified Administrator Cheatsheet
This material was gathered during my preparation for the CKA certification exam.
Automated benchmark framework for CI/CD?
I'm thinking about building an open source micro-framework that tightly integrates microbenchmarking with CI/CD processes such as Jenkins.
The motivation for this is:
\- Benchmarking needs a known and "quiet" environment so results are accurate
\- A need to regressively compare benchmark results for different software revs. and issue a go/no-go
The resultant framework would be able to launch benchmark jobs at designated servers, extract and auto-compare the results, and provide nice graphs for analysis. Also considering integrating popular microbenchmark frameworks like Criterion for Rust and Google Benchmark, and applicable as a plugin for Jenkins.
Will this be useful to anyone?
Any feedback + feature request would be appreciated!
https://redd.it/l3q4x4
@r_devops
I'm thinking about building an open source micro-framework that tightly integrates microbenchmarking with CI/CD processes such as Jenkins.
The motivation for this is:
\- Benchmarking needs a known and "quiet" environment so results are accurate
\- A need to regressively compare benchmark results for different software revs. and issue a go/no-go
The resultant framework would be able to launch benchmark jobs at designated servers, extract and auto-compare the results, and provide nice graphs for analysis. Also considering integrating popular microbenchmark frameworks like Criterion for Rust and Google Benchmark, and applicable as a plugin for Jenkins.
Will this be useful to anyone?
Any feedback + feature request would be appreciated!
https://redd.it/l3q4x4
@r_devops
reddit
Automated benchmark framework for CI/CD?
I'm thinking about building an open source micro-framework that tightly integrates microbenchmarking with CI/CD processes such as Jenkins. The...
Question Which metrics is important for you?
Hello, i work on opensource monitoring system. And i have question.
Which metric is important for you? Like CPU/memory/Request time/Ssl expiration/ping/etc
https://redd.it/l3o9ul
@r_devops
Hello, i work on opensource monitoring system. And i have question.
Which metric is important for you? Like CPU/memory/Request time/Ssl expiration/ping/etc
https://redd.it/l3o9ul
@r_devops
reddit
[Question] Which metrics is important for you?
Hello, i work on opensource monitoring system. And i have question. Which metric is important for you? Like CPU/memory/Request time/Ssl...
What is this filetype?
example-webapp-linux
A file is present under the "dist" folder of a zipped webapp, which goes by the name "example-webapp-linux".
Can someone help me understand what is the purpose of this file.
https://redd.it/l3pv5p
@r_devops
example-webapp-linux
A file is present under the "dist" folder of a zipped webapp, which goes by the name "example-webapp-linux".
Can someone help me understand what is the purpose of this file.
https://redd.it/l3pv5p
@r_devops
reddit
What is this filetype?
example-webapp-linux A file is present under the "dist" folder of a zipped webapp, which goes by the name "example-webapp-linux". Can someone...
How do you manage Prometheus configuration changes?
I recently set up a Prometheus instance on a VM to monitor my infrastructure. However, I still cant find a nice and automated way to manage and update my configuration changes (changing alerting rules, add more targets etc). This problem also applies to many more systems similar to Prometheus where configuration changes are being made quite often.
What's you approach on this?
https://redd.it/l4l1yh
@r_devops
I recently set up a Prometheus instance on a VM to monitor my infrastructure. However, I still cant find a nice and automated way to manage and update my configuration changes (changing alerting rules, add more targets etc). This problem also applies to many more systems similar to Prometheus where configuration changes are being made quite often.
What's you approach on this?
https://redd.it/l4l1yh
@r_devops
reddit
How do you manage Prometheus configuration changes?
I recently set up a Prometheus instance on a VM to monitor my infrastructure. However, I still cant find a nice and automated way to manage and...
How TLS and HTTPS Work - Plus a Handful of Useful Tools
Understanding the core concepts behind TLS and HTTPS is very important for any developer and especially for web developers. In this video, Boris Strelnikov explains how TLS and cryptography work, what CA is and even give a handful of useful tools to simplify the work with certificates and encryption:
https://youtu.be/4LmqZmzblME
https://redd.it/l4pl5i
@r_devops
Understanding the core concepts behind TLS and HTTPS is very important for any developer and especially for web developers. In this video, Boris Strelnikov explains how TLS and cryptography work, what CA is and even give a handful of useful tools to simplify the work with certificates and encryption:
https://youtu.be/4LmqZmzblME
https://redd.it/l4pl5i
@r_devops
YouTube
How TLS and HTTPS Work - Plus a Handful of Useful Tools
Understanding the core concepts behind TLS and HTTPS is very important for any developer and especially for web developers. In this video, Boris Strelnikov explains how TLS and cryptography work, what CA is and even give a handful of useful tools to simplify…
What do you guys think about Hashicorp's Waypoint? Is it here to stay?
Anyone using it already extensively that can share the experience?
https://redd.it/l4ly6r
@r_devops
Anyone using it already extensively that can share the experience?
https://redd.it/l4ly6r
@r_devops
reddit
What do you guys think about Hashicorp's Waypoint? Is it here to stay?
Anyone using it already extensively that can share the experience?
Tool to determine what plugins are not compatible with Kubernetes?
I am looking for a way to determine what if any plugins are not compatible with a version of kubernetes/EKS. I need to do it to be a script able method and maybe is possible do it via a CI check when certain actions happen in a gitops repo.
Is there a tool that exists for this I could you or maybe something AWS native?
https://redd.it/l4ueqd
@r_devops
I am looking for a way to determine what if any plugins are not compatible with a version of kubernetes/EKS. I need to do it to be a script able method and maybe is possible do it via a CI check when certain actions happen in a gitops repo.
Is there a tool that exists for this I could you or maybe something AWS native?
https://redd.it/l4ueqd
@r_devops
reddit
Tool to determine what plugins are not compatible with Kubernetes?
I am looking for a way to determine what if any plugins are not compatible with a version of kubernetes/EKS. I need to do it to be a script able...
Azure Pipelines & ARM resources: overrideParameters
I have been working on an Azure project for some months now, not having any prior experience with the platform I'm working out best practices and patterns first hand. I have made many mistakes and paid the price.
Does anyone here have any input for someone who is working on a single repo project & has growing lists of overrideParameters.
Ideas to help me minimise the amount of input params would be useful, I haven't seen any examples with even a fraction of the amount I am inputting.
my consideration for improvement:
\- construct as many params as possible within the arm template.
https://redd.it/l4ooa6
@r_devops
I have been working on an Azure project for some months now, not having any prior experience with the platform I'm working out best practices and patterns first hand. I have made many mistakes and paid the price.
Does anyone here have any input for someone who is working on a single repo project & has growing lists of overrideParameters.
Ideas to help me minimise the amount of input params would be useful, I haven't seen any examples with even a fraction of the amount I am inputting.
my consideration for improvement:
\- construct as many params as possible within the arm template.
https://redd.it/l4ooa6
@r_devops
reddit
Azure Pipelines & ARM resources: overrideParameters
I have been working on an Azure project for some months now, not having any prior experience with the platform I'm working out best practices and...
How do you handle your cloud state with terraform when it does not equal the reality anymore
Taking the IaC approach, it seems like the state of your cloud infra differs from the actual setup because some changes weren't made the IaC way. How do you handle this issue? Do you start from scratch and import the state completely or do you take a different approach? What about cloud components that haven't been set up with IaC at all, e.g. Route53 configurations in AWS?
https://redd.it/l4mfbu
@r_devops
Taking the IaC approach, it seems like the state of your cloud infra differs from the actual setup because some changes weren't made the IaC way. How do you handle this issue? Do you start from scratch and import the state completely or do you take a different approach? What about cloud components that haven't been set up with IaC at all, e.g. Route53 configurations in AWS?
https://redd.it/l4mfbu
@r_devops
reddit
How do you handle your cloud state with terraform when it does not...
Taking the IaC approach, it seems like the state of your cloud infra differs from the actual setup because some changes weren't made the IaC way....
Is there a declarative tool for provisioning services via API?
This seemed like the most appropriate sub to pose this question. I self-host quite a few services by docker, and have started to look into what’s possible with APIs (they all have one). It seems that you can configure most aspects of them via the API, however all I see are simple curl examples of how to do things via API. It seems to me that a tool should exist that you can feed a YAML file and it would automatically make the calls and configure the settings.
However after some pretty extensive searching, I have yet to find a tool like this. Swagger and Postman look similar to what I envision, but after a not so deep dive into both they don’t seem intended for this. Also, Id prefer this be something I can integrate with Ansible or Terraform (which is also surprising I haven’t found a built in method to accomplish this, although I know this is exactly what Terraform does under the hood).
So I’m hoping someone may point me in the right direction. Thanks in advance everyone.
https://redd.it/l4ik75
@r_devops
This seemed like the most appropriate sub to pose this question. I self-host quite a few services by docker, and have started to look into what’s possible with APIs (they all have one). It seems that you can configure most aspects of them via the API, however all I see are simple curl examples of how to do things via API. It seems to me that a tool should exist that you can feed a YAML file and it would automatically make the calls and configure the settings.
However after some pretty extensive searching, I have yet to find a tool like this. Swagger and Postman look similar to what I envision, but after a not so deep dive into both they don’t seem intended for this. Also, Id prefer this be something I can integrate with Ansible or Terraform (which is also surprising I haven’t found a built in method to accomplish this, although I know this is exactly what Terraform does under the hood).
So I’m hoping someone may point me in the right direction. Thanks in advance everyone.
https://redd.it/l4ik75
@r_devops
reddit
Is there a declarative tool for provisioning services via API?
This seemed like the most appropriate sub to pose this question. I self-host quite a few services by docker, and have started to look into what’s...
memory utilization
I have last few months data of
>Memory sys % util ,
>Memory user % util
>Page/Swap % util data.
Which util % is relevant to understand if memory is fully utilised or underutilised ?
https://redd.it/l4hnk6
@r_devops
I have last few months data of
>Memory sys % util ,
>Memory user % util
>Page/Swap % util data.
Which util % is relevant to understand if memory is fully utilised or underutilised ?
https://redd.it/l4hnk6
@r_devops
reddit
memory utilization
I have last few months data of >Memory sys % util , >Memory user % util >Page/Swap % util data. Which util % is relevant to understand ...
What do you use to collect business metrics?
So I guess this is things that don’t get instrumented out of the box by standard APM tools like login success/failures, successful checkouts, user sign-ups etc. I’m currently reading the DevOps Handbook which mentions StatsD but this seems less popular now than at the time of printing. The ideal solution is something with the lowest friction for developers to implement and low to no operational overhead.
https://redd.it/l4yuns
@r_devops
So I guess this is things that don’t get instrumented out of the box by standard APM tools like login success/failures, successful checkouts, user sign-ups etc. I’m currently reading the DevOps Handbook which mentions StatsD but this seems less popular now than at the time of printing. The ideal solution is something with the lowest friction for developers to implement and low to no operational overhead.
https://redd.it/l4yuns
@r_devops
reddit
What do you use to collect business metrics?
So I guess this is things that don’t get instrumented out of the box by standard APM tools like login success/failures, successful checkouts, user...
Is there a good reason to dockerize a cronjob?
Is there a good reason to dockerize a cronjob? I am trying to think if it's even worth it. Why not just run it locally? When should you dockerize a cronjob?
https://redd.it/l52xm7
@r_devops
Is there a good reason to dockerize a cronjob? I am trying to think if it's even worth it. Why not just run it locally? When should you dockerize a cronjob?
https://redd.it/l52xm7
@r_devops
reddit
Is there a good reason to dockerize a cronjob?
Is there a good reason to dockerize a cronjob? I am trying to think if it's even worth it. Why not just run it locally? When should you dockerize...
How do you CI / CD?
How frequently does your company/code get integrated and deployed?
View Poll
https://redd.it/l4vniy
@r_devops
How frequently does your company/code get integrated and deployed?
View Poll
https://redd.it/l4vniy
@r_devops
reddit
How do you CI / CD?
How frequently does your company/code get integrated and deployed?
Improving how we deploy GitHub
Interesting article from the GitHub team, walking through their new internal deployment pipeline & automation at a high level, and their reasoning for changing it: https://github.blog/2021-01-25-improving-how-we-deploy-github/
https://redd.it/l4u4cq
@r_devops
Interesting article from the GitHub team, walking through their new internal deployment pipeline & automation at a high level, and their reasoning for changing it: https://github.blog/2021-01-25-improving-how-we-deploy-github/
https://redd.it/l4u4cq
@r_devops
The GitHub Blog
Improving how we deploy GitHub
As GitHub doubled it’s developer head count, tooling that worked for us no longer functioned in the same capacity. We aimed to improve the deployment process for all developers at GitHub and mitigate risk associated with deploying one of the largest developer…
Backend/Frontend in same repository
How do you manage the pipeline definition in Jenkins on a repository who has backend and frontend in the same repository?
Because when a change is made to the frontend (for example: a picture is changed) the pipeline gets all the code both frontend and backend, build both, do testing on both, deploy both, but the backend code did not change.
How do I define my pipeline to do the automation process separated?
The only solution is to separate my front and back in different repositories?
​
Thanks in advance.
https://redd.it/l4twsx
@r_devops
How do you manage the pipeline definition in Jenkins on a repository who has backend and frontend in the same repository?
Because when a change is made to the frontend (for example: a picture is changed) the pipeline gets all the code both frontend and backend, build both, do testing on both, deploy both, but the backend code did not change.
How do I define my pipeline to do the automation process separated?
The only solution is to separate my front and back in different repositories?
​
Thanks in advance.
https://redd.it/l4twsx
@r_devops
reddit
Backend/Frontend in same repository
How do you manage the pipeline definition in Jenkins on a repository who has backend and frontend in the same repository? Because when a change...
Teardown feature branch environment
I'm setting up automated deployment/Teardown of a feature branch environment. I'm triggering the creation/deploy of it when a branch is committed/created and isn't the default (master) branch.
What I'm struggling to do is figuring out what should trigger the Teardown of that environment. to merge into master, my team has to do a GitHub pr. I'm thinking about triggering off the merge to master and parsing the GitHub pr merge message for the feature branch name (using powershell) and deleting with that. Does that sound reasonable? Is there a better way?
My stack is Github for repo and Azure devops for pipelines.
Thanks!
https://redd.it/l53wvs
@r_devops
I'm setting up automated deployment/Teardown of a feature branch environment. I'm triggering the creation/deploy of it when a branch is committed/created and isn't the default (master) branch.
What I'm struggling to do is figuring out what should trigger the Teardown of that environment. to merge into master, my team has to do a GitHub pr. I'm thinking about triggering off the merge to master and parsing the GitHub pr merge message for the feature branch name (using powershell) and deleting with that. Does that sound reasonable? Is there a better way?
My stack is Github for repo and Azure devops for pipelines.
Thanks!
https://redd.it/l53wvs
@r_devops
reddit
Teardown feature branch environment
I'm setting up automated deployment/Teardown of a feature branch environment. I'm triggering the creation/deploy of it when a branch is...
configuring ec2 for node.js apps with pm2 and nginx
First of all, I'm a backend developer, so I don't know much about devops besides basic CI/CD configuration with deploys in more "automated" services, like Heroku, etc.
What I'm trying to do, is have my EC2 instance host my Node.js apps, and use PM2 to startup/monitor each one. I configured the `ecosystem.config.js` with this:
module.exports = {
apps: [
{
name: "my-app",
cwd: "./my-app/packages/backend/",
script: "yarn",
args: "start:prod",
env: {
PORT: 3010,
// Other env vars
}
},
],
};
For now this app is a Nest.js service, that I build manually and use that command to start it. That part is running ok.
After that I tried installing Nginx on the server, to try to reverse-proxy all requests to my app (when I'll have more than one app, I'll probably need to proxy using subdomain like `my-app1.domain.com` -> localhost:3010, `my-app2.domain.com` -> localhost:3020).
Even if don't change anything on the nginx config files, when I try to access the server by the IP or DNS from AWS, it should show that default "You are using NGINX" page right?
All I'm getting now is `ERR_CONNECTION_REFUSED` when I try to access it. [Here is the Inboud and Outbound rules for my instance](https://imgur.com/a/RnrSHn5). I followed [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04#set-up-nginx-as-a-reverse-proxy-server) to configure the reverse-proxy, and that part seems ok. If I try to run `curl https://localhost:3010/status` or `curl https://localhost/status` inside the server, I get the right response from my app
Thanks for the help!
---
Since I'm here, is there any other service with a nice free tier for this? I've used Heroku, but since it doesn't have servers where I live, the response time is a bit high. I was using GCP App Engine before, but I couldn't configure my env_vars in some way that I didn't need to commit an `.env` file with DB credentials and keys in my source code (which I REALLY don't wanna do it).
Running my own server is also not ideal since I'll need to manually SSH to the machine, pull the latest changes and restart the PM2 server, but at least is free and I can run multiple apps
https://redd.it/l5hwyv
@r_devops
First of all, I'm a backend developer, so I don't know much about devops besides basic CI/CD configuration with deploys in more "automated" services, like Heroku, etc.
What I'm trying to do, is have my EC2 instance host my Node.js apps, and use PM2 to startup/monitor each one. I configured the `ecosystem.config.js` with this:
module.exports = {
apps: [
{
name: "my-app",
cwd: "./my-app/packages/backend/",
script: "yarn",
args: "start:prod",
env: {
PORT: 3010,
// Other env vars
}
},
],
};
For now this app is a Nest.js service, that I build manually and use that command to start it. That part is running ok.
After that I tried installing Nginx on the server, to try to reverse-proxy all requests to my app (when I'll have more than one app, I'll probably need to proxy using subdomain like `my-app1.domain.com` -> localhost:3010, `my-app2.domain.com` -> localhost:3020).
Even if don't change anything on the nginx config files, when I try to access the server by the IP or DNS from AWS, it should show that default "You are using NGINX" page right?
All I'm getting now is `ERR_CONNECTION_REFUSED` when I try to access it. [Here is the Inboud and Outbound rules for my instance](https://imgur.com/a/RnrSHn5). I followed [this tutorial](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04#set-up-nginx-as-a-reverse-proxy-server) to configure the reverse-proxy, and that part seems ok. If I try to run `curl https://localhost:3010/status` or `curl https://localhost/status` inside the server, I get the right response from my app
Thanks for the help!
---
Since I'm here, is there any other service with a nice free tier for this? I've used Heroku, but since it doesn't have servers where I live, the response time is a bit high. I was using GCP App Engine before, but I couldn't configure my env_vars in some way that I didn't need to commit an `.env` file with DB credentials and keys in my source code (which I REALLY don't wanna do it).
Running my own server is also not ideal since I'll need to manually SSH to the machine, pull the latest changes and restart the PM2 server, but at least is free and I can run multiple apps
https://redd.it/l5hwyv
@r_devops
Imgur
Post with 0 views.
What can you do with Docker/K8s agents on Azure?
I'm getting more into the world of CI/CD and kubernetes.
I recently had to set up our own Azure agent to run .NET core API tests. I think I'm limited to Linux or Windows because the tests use OS environment variables and a runsettings file but it got me thinking.
Is it possible to run NUnit API tests on an Azure agent in docker or AKS?
If not, what can you do with an agent hosted in this way? Just build/push to a container registry?
https://redd.it/l5hm53
@r_devops
I'm getting more into the world of CI/CD and kubernetes.
I recently had to set up our own Azure agent to run .NET core API tests. I think I'm limited to Linux or Windows because the tests use OS environment variables and a runsettings file but it got me thinking.
Is it possible to run NUnit API tests on an Azure agent in docker or AKS?
If not, what can you do with an agent hosted in this way? Just build/push to a container registry?
https://redd.it/l5hm53
@r_devops
reddit
What can you do with Docker/K8s agents on Azure?
I'm getting more into the world of CI/CD and kubernetes. I recently had to set up our own Azure agent to run .NET core API tests. I think I'm...