Remembering shell commands that you are not usually using from day to day
Hey guys,
I have been using a terminal during my job from day to day basis during last couple years. However I have been struggling remembering all the flags and syntax for a commands like awk, sed, find - basically the ones which I do not use quite always or just being lazy to google again their syntax and going with ChatGPT. I have found myself stuck in a loop, where each few month I go back to them really being motivated to get the into my brain that time, however 1 day after relearning/practicing them and they are out of my memory.
Could someone please any advices on how to settle them down into my mechanical memory?
https://redd.it/1cetuur
@r_devops
Hey guys,
I have been using a terminal during my job from day to day basis during last couple years. However I have been struggling remembering all the flags and syntax for a commands like awk, sed, find - basically the ones which I do not use quite always or just being lazy to google again their syntax and going with ChatGPT. I have found myself stuck in a loop, where each few month I go back to them really being motivated to get the into my brain that time, however 1 day after relearning/practicing them and they are out of my memory.
Could someone please any advices on how to settle them down into my mechanical memory?
https://redd.it/1cetuur
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Exploring Tool Proliferation and Security in Cloud-Native Environments – Share Your Experience!
Hello everyone,
I’m currently working on a master’s research paper that delves into the complexities of tool proliferation and the management of access rights within cloud-native environments, specifically focusing on the security challenges that emerge in such dynamic settings.
As cloud-native technologies evolve, the array of tools available to developers and IT professionals continues to expand. This rapid tool proliferation can lead to security vulnerabilities and inefficiencies, particularly when older tools become obsolete but remain in use without proper updates or oversight.
I’m reaching out to this community to gather insights on the following:
1. Current Tool Usage:
What tools are you currently using in your cloud-native environment (e.g., Kubernetes, GitLab, Jira, specific IDEs)?
How do these tools integrate with your overall system architecture?
2. Tool Lifecycle and Management:
Have you discontinued any tools? If so, what were the reasons (e.g., security concerns, better alternatives)?
What processes do you have in place for updating or replacing tools?
3. Security Concerns:
Have you experienced any security incidents linked to tool proliferation?
What measures do you take to mitigate security risks associated with the tools you use?
4. Feedback on Tool Efficacy and Efficiency:
How do you assess the effectiveness and efficiency of the tools in your environment?
Are there any tools you find indispensable or particularly problematic?
Why Your Input Matters:
Your contributions will be instrumental in shaping effective strategies to manage tool sprawl and enhance security in cloud-native ecosystems. The findings from this study aim to provide actionable insights that could help in optimizing tool usage and improving security protocols in tech environments similar to yours.
How to Participate:
Please share your experiences in the comments below or, if you prefer, via a direct message. Feel free to include any additional observations or insights related to the use, management, and security of cloud-native tools.
Thank you in advance for your participation and for sharing your valuable insights!
https://redd.it/1cewe23
@r_devops
Hello everyone,
I’m currently working on a master’s research paper that delves into the complexities of tool proliferation and the management of access rights within cloud-native environments, specifically focusing on the security challenges that emerge in such dynamic settings.
As cloud-native technologies evolve, the array of tools available to developers and IT professionals continues to expand. This rapid tool proliferation can lead to security vulnerabilities and inefficiencies, particularly when older tools become obsolete but remain in use without proper updates or oversight.
I’m reaching out to this community to gather insights on the following:
1. Current Tool Usage:
What tools are you currently using in your cloud-native environment (e.g., Kubernetes, GitLab, Jira, specific IDEs)?
How do these tools integrate with your overall system architecture?
2. Tool Lifecycle and Management:
Have you discontinued any tools? If so, what were the reasons (e.g., security concerns, better alternatives)?
What processes do you have in place for updating or replacing tools?
3. Security Concerns:
Have you experienced any security incidents linked to tool proliferation?
What measures do you take to mitigate security risks associated with the tools you use?
4. Feedback on Tool Efficacy and Efficiency:
How do you assess the effectiveness and efficiency of the tools in your environment?
Are there any tools you find indispensable or particularly problematic?
Why Your Input Matters:
Your contributions will be instrumental in shaping effective strategies to manage tool sprawl and enhance security in cloud-native ecosystems. The findings from this study aim to provide actionable insights that could help in optimizing tool usage and improving security protocols in tech environments similar to yours.
How to Participate:
Please share your experiences in the comments below or, if you prefer, via a direct message. Feel free to include any additional observations or insights related to the use, management, and security of cloud-native tools.
Thank you in advance for your participation and for sharing your valuable insights!
https://redd.it/1cewe23
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Is this supposed to be my job?
Do any of you guys find yourself being tasked with debugging every error that happens in your environment? Some days it feels like I am the first point of contact for any problem with our internally developed applications. I came from the SysOps side of things so I have no professional experience as a developer. It baffles me why they ask me to look at some of these things, and how little some of the developers know about how things work.
https://redd.it/1cex244
@r_devops
Do any of you guys find yourself being tasked with debugging every error that happens in your environment? Some days it feels like I am the first point of contact for any problem with our internally developed applications. I came from the SysOps side of things so I have no professional experience as a developer. It baffles me why they ask me to look at some of these things, and how little some of the developers know about how things work.
https://redd.it/1cex244
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
How to find an intership as an entry level DevOps engineer??
Is there any resources or website where they could give me a n internship (remote) with a certificate so that I could use to boost up my resume .please drop your thoughts.
https://redd.it/1cewvy7
@r_devops
Is there any resources or website where they could give me a n internship (remote) with a certificate so that I could use to boost up my resume .please drop your thoughts.
https://redd.it/1cewvy7
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Need help
New here want to learn Devops so what will be the greater choice between to learn just Devops or should i go with aws Devops???
https://redd.it/1cf0rmd
@r_devops
New here want to learn Devops so what will be the greater choice between to learn just Devops or should i go with aws Devops???
https://redd.it/1cf0rmd
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Greenmask release v0.1.11. Database anonymization tool
A new release introduces improvements and bug fixes.
https://github.com/GreenmaskIO/greenmask
This release introduces improvements and bug fixes
# Changes
Added support for generated columns in the table
Fixed transformer parameters encoding issue caused by spf13/viper
Fixed table scoring for transformed table
Refactored connection management logic in restore command - fixes connection idle timeout
If you are not familiar yet with Greenmask - it is a Database anonymization tool that brings wide anonymization functionalities and techniques. Check out the Playground page to get started
https://redd.it/1cf3emn
@r_devops
A new release introduces improvements and bug fixes.
https://github.com/GreenmaskIO/greenmask
This release introduces improvements and bug fixes
# Changes
Added support for generated columns in the table
Fixed transformer parameters encoding issue caused by spf13/viper
Fixed table scoring for transformed table
Refactored connection management logic in restore command - fixes connection idle timeout
If you are not familiar yet with Greenmask - it is a Database anonymization tool that brings wide anonymization functionalities and techniques. Check out the Playground page to get started
https://redd.it/1cf3emn
@r_devops
GitHub
Release v0.1.11 · GreenmaskIO/greenmask
Greenmask 0.1.11
This release introduces improvements and bug fixes
Changes
Added support for generated columns in the table #77
Fixed transformer parameters encoding issue caused by spf13/viper #...
This release introduces improvements and bug fixes
Changes
Added support for generated columns in the table #77
Fixed transformer parameters encoding issue caused by spf13/viper #...
Help to create a strong and solid assessment for IaC toolkit
Hi all
Our Team has been tasked to create an automation to deploy and configure a product's infrastructure.
That means we first need to evaluate and decide what tools to use.
I want to create an assessment that help us identify pain points, problems, challenges and considerations when making the decision, but also helps us showcase this to the product's architects, security team and dev team.
Some context and also some of the main challenges we need to take into account is that the product is integrated (and thus, has dependencies) with other products in the company, so the solution will probably have to be a mix of declarative IaC but also imperative scripts. My DevOps Team doesn't have experience with IaC. There's some minor experience as devs, and a lot of good will and incentive, but we are not devs.
The product itself is written in Python and lives mainly in Azure, in a AKS with some other related supporting infra.
I'm considering Terraform (I have experience and worked a lot with it, but that's not the case for the rest of the team. I'm also concerned because of the recent IBM adquisition), Pulumi ( Product itself is in Python, the Devs could integrate with us more seamlessly, but it could be a challenge to skill up our team in time and that could end up in spaghettization), OpenTofu (just because of the IBM point mentioned before).
I don't expect to get a straight and simple answer here or anywhere since it's a very complex matter. I already searched here and I found a very good post this very year about Pulumi issues, pros and cons.
That's why I want to understand how can I build an assessment matrix or algorithm that can help us drive the discussion and decide.
https://redd.it/1cf5cry
@r_devops
Hi all
Our Team has been tasked to create an automation to deploy and configure a product's infrastructure.
That means we first need to evaluate and decide what tools to use.
I want to create an assessment that help us identify pain points, problems, challenges and considerations when making the decision, but also helps us showcase this to the product's architects, security team and dev team.
Some context and also some of the main challenges we need to take into account is that the product is integrated (and thus, has dependencies) with other products in the company, so the solution will probably have to be a mix of declarative IaC but also imperative scripts. My DevOps Team doesn't have experience with IaC. There's some minor experience as devs, and a lot of good will and incentive, but we are not devs.
The product itself is written in Python and lives mainly in Azure, in a AKS with some other related supporting infra.
I'm considering Terraform (I have experience and worked a lot with it, but that's not the case for the rest of the team. I'm also concerned because of the recent IBM adquisition), Pulumi ( Product itself is in Python, the Devs could integrate with us more seamlessly, but it could be a challenge to skill up our team in time and that could end up in spaghettization), OpenTofu (just because of the IBM point mentioned before).
I don't expect to get a straight and simple answer here or anywhere since it's a very complex matter. I already searched here and I found a very good post this very year about Pulumi issues, pros and cons.
That's why I want to understand how can I build an assessment matrix or algorithm that can help us drive the discussion and decide.
https://redd.it/1cf5cry
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Best way to implement Docker staging & production - both in the cloud?
Hi guys,
A question regarding best practices:
I've set up a few applications on a Linux VPS using Portainer on top of Docker.
For one of the apps (a data viz tool, it's using Apache Superset) I would ideally also like to have a staging environment where I can try out a few frontend modifications without risking making production inaccessible.
From what I've seen, all modern staging -> production workflows are intended to work around Git but ... the approach I've gone for is deploying with Portainer straight onto infrastruture.
Is there a way to create a staging -> production setup with what I have? Or do I need to "rearchitect" to set that up properly?
TIA
https://redd.it/1cf80si
@r_devops
Hi guys,
A question regarding best practices:
I've set up a few applications on a Linux VPS using Portainer on top of Docker.
For one of the apps (a data viz tool, it's using Apache Superset) I would ideally also like to have a staging environment where I can try out a few frontend modifications without risking making production inaccessible.
From what I've seen, all modern staging -> production workflows are intended to work around Git but ... the approach I've gone for is deploying with Portainer straight onto infrastruture.
Is there a way to create a staging -> production setup with what I have? Or do I need to "rearchitect" to set that up properly?
TIA
https://redd.it/1cf80si
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Do i need to have solid knowledge of programming to become devops engineer?
Hey I am interested in devops and I don't have a solid knowledge of programming, I know concepts of it and basics, I only have little bit concepts of DSA
Can I still learn devops knowing basics of programming??
https://redd.it/1cf9ab2
@r_devops
Hey I am interested in devops and I don't have a solid knowledge of programming, I know concepts of it and basics, I only have little bit concepts of DSA
Can I still learn devops knowing basics of programming??
https://redd.it/1cf9ab2
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Hadoop cluster monitoring
Hi everyone, are there any monitoring agents or tools to monitor a hadoop cluster?
https://redd.it/1cf9t9l
@r_devops
Hi everyone, are there any monitoring agents or tools to monitor a hadoop cluster?
https://redd.it/1cf9t9l
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Need help! Am I on the right path for DevOps?
I have been trying to get a senior DevOps role in India and have 6 years of experience. But due to these hard times, it's really difficult to get a referral on LinkedIn and I am getting demotivated now.
I have been working for 6 years as a DevOps engineer and my company refuses to promote me as according to them re-architecting how a tool is set up is not "Groundbreaking". My salary is also less than my colleagues.
I did AWS certification but it seems that was not enough, so I am thinking of getting a K8s CKA cert as well. Am I on the right path and shall I continue trying to get a job through LinkedIn?
https://redd.it/1cfc4h9
@r_devops
I have been trying to get a senior DevOps role in India and have 6 years of experience. But due to these hard times, it's really difficult to get a referral on LinkedIn and I am getting demotivated now.
I have been working for 6 years as a DevOps engineer and my company refuses to promote me as according to them re-architecting how a tool is set up is not "Groundbreaking". My salary is also less than my colleagues.
I did AWS certification but it seems that was not enough, so I am thinking of getting a K8s CKA cert as well. Am I on the right path and shall I continue trying to get a job through LinkedIn?
https://redd.it/1cfc4h9
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Need advice regarding my nxst phase, transitioning from Software Engineering to DevOps
I've Pearson BTEC Level 5 Higher National Diploma in COMPUTING (SOFTWARE ENGINEERING) and have 3 years experience as a Software Engineer( very intensive position at the previous company worked on react nodejs geaphql and even had to manage some aws and firebase stuff too) and currently in a DevOps Engineer position and l'm willing to pursue the Devops path and progress my academic qualifications as well. What are your suggestions regarding my next step in qualifications? (Aws certifications or top up degree? Current position deals with aws and I've some knowledge about it and the current employer doesn't demand any more certifications or academic qualifications)
https://redd.it/1cfhen4
@r_devops
I've Pearson BTEC Level 5 Higher National Diploma in COMPUTING (SOFTWARE ENGINEERING) and have 3 years experience as a Software Engineer( very intensive position at the previous company worked on react nodejs geaphql and even had to manage some aws and firebase stuff too) and currently in a DevOps Engineer position and l'm willing to pursue the Devops path and progress my academic qualifications as well. What are your suggestions regarding my next step in qualifications? (Aws certifications or top up degree? Current position deals with aws and I've some knowledge about it and the current employer doesn't demand any more certifications or academic qualifications)
https://redd.it/1cfhen4
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
How to prepare for DevSecOps interview as someone with no experience?
I'm currently a software engineer, but my position was eliminated and they're letting me go. However I was given an opportunity for redeployment into a DevSecOps role. The phone screening I had Thursday went well and they said they'd follow up with me early this week to schedule a virtual interview with the team. Problem is I have absolutely no experience with DevSecOps, the most experience I have is I know how to use GitHub and Microsoft Azure. What can I do to prepare? The job is to develop and maintain CI/CD pipelines (I at least studied that so far) for embedded software in Azure DevOps.
https://redd.it/1cfh1ky
@r_devops
I'm currently a software engineer, but my position was eliminated and they're letting me go. However I was given an opportunity for redeployment into a DevSecOps role. The phone screening I had Thursday went well and they said they'd follow up with me early this week to schedule a virtual interview with the team. Problem is I have absolutely no experience with DevSecOps, the most experience I have is I know how to use GitHub and Microsoft Azure. What can I do to prepare? The job is to develop and maintain CI/CD pipelines (I at least studied that so far) for embedded software in Azure DevOps.
https://redd.it/1cfh1ky
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Building Blog Using MERN Stack | Free Udemy course for limited time
https://www.webhelperapp.com/building-blog-using-mern-stack/
https://redd.it/1cfgmgi
@r_devops
https://www.webhelperapp.com/building-blog-using-mern-stack/
https://redd.it/1cfgmgi
@r_devops
Free Udemy Coupons
Building Blog using MERN Stack
Welcome to "MERN Stack with Blog Project". In this course, we will be building an in-depth full-stack Blog project application using Node.js,
Looking to solve problems
Im looking to start a software project and fix a niche devops problem. I was thinking about creating a very easy to use, but powerful CICD system that could be used in classified environments. Ive noticed that everywhere I work, they are always using Jenkins. Jenkins is a beast in unclass environments, but even harder to maintain on the class side. Ideally, I would build this on top of kubernetes. Im open to other ideas. Like I said, im looking for a problem to solve.
https://redd.it/1cfm2an
@r_devops
Im looking to start a software project and fix a niche devops problem. I was thinking about creating a very easy to use, but powerful CICD system that could be used in classified environments. Ive noticed that everywhere I work, they are always using Jenkins. Jenkins is a beast in unclass environments, but even harder to maintain on the class side. Ideally, I would build this on top of kubernetes. Im open to other ideas. Like I said, im looking for a problem to solve.
https://redd.it/1cfm2an
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
How to access nested value in kusto when there a dynamic nunber.
Hello Guys,
I am trying to access the values of security rules in azure for change analysis. Below is the KQL query
arg("").resourcechanges
|extend changeTime = todatetime(properties.changeAttributes.timestamp), targetResourceId = tostring(properties.targetResourceId),
changeType = tostring(properties.changeType), correlationId = properties.changeAttributes.correlationId,
changedProperties = properties.changes, changeCount = properties.changeAttributes.changesCount ,clientType = properties.changeAttributes.clientType, name = tostring(properties.changes."properties.securityRules[18.name"].newValue)
|where targetResourceId contains "providers/Microsoft.Network/networkSecurityGroups/" and clientType !contains "Windows Azure Security Resource Provider"
|where changeTime > ago(5d)
|order by tostring(changeTime) desc
|project changeTime, targetResourceId, changeType, correlationId, changeCount, tostring(changedProperties), clientType, name
I would like to access the value of securityRules but the number 18 is random. How do I write a query where it does not bother about the number 18 and I can access the value like .newValue as I have shown above.
Kindly help me out. I have tried to use regex but I am not able to figure out how to do this.
https://redd.it/1cftk1l
@r_devops
Hello Guys,
I am trying to access the values of security rules in azure for change analysis. Below is the KQL query
arg("").resourcechanges
|extend changeTime = todatetime(properties.changeAttributes.timestamp), targetResourceId = tostring(properties.targetResourceId),
changeType = tostring(properties.changeType), correlationId = properties.changeAttributes.correlationId,
changedProperties = properties.changes, changeCount = properties.changeAttributes.changesCount ,clientType = properties.changeAttributes.clientType, name = tostring(properties.changes."properties.securityRules[18.name"].newValue)
|where targetResourceId contains "providers/Microsoft.Network/networkSecurityGroups/" and clientType !contains "Windows Azure Security Resource Provider"
|where changeTime > ago(5d)
|order by tostring(changeTime) desc
|project changeTime, targetResourceId, changeType, correlationId, changeCount, tostring(changedProperties), clientType, name
I would like to access the value of securityRules but the number 18 is random. How do I write a query where it does not bother about the number 18 and I can access the value like .newValue as I have shown above.
Kindly help me out. I have tried to use regex but I am not able to figure out how to do this.
https://redd.it/1cftk1l
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
How to properly use persistent storage in dev container
Hello,
I'm learning about using dev container and quite new to all this so very sorry if my question is too basic.
How do you use persistent storage in dev container in Windows with WSL2? From what i read, the best way in term of performance is to use Docker Volume. If this is the case, how do you manage to quickly open a project, since in Window, the WSL backend stores volumn in a deep location. From my understanding, your actual code will be stored in Linus file systems (Ubuntu in my case), is this correct?
Thank you very much for your help.
https://redd.it/1cftzwh
@r_devops
Hello,
I'm learning about using dev container and quite new to all this so very sorry if my question is too basic.
How do you use persistent storage in dev container in Windows with WSL2? From what i read, the best way in term of performance is to use Docker Volume. If this is the case, how do you manage to quickly open a project, since in Window, the WSL backend stores volumn in a deep location. From my understanding, your actual code will be stored in Linus file systems (Ubuntu in my case), is this correct?
Thank you very much for your help.
https://redd.it/1cftzwh
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Becoming a DevOps Contractor - how did you do it?
Hi all,
I've considered for a long time becoming a contractor in DevOps. It appeals to me, the ability to make more money, have a bit more control over my work.
But for those of you who have gotten into contracting... how did you do it? At what point did you know you were smart enough and knew enough, and how did you network, etc?
https://redd.it/1cfv33x
@r_devops
Hi all,
I've considered for a long time becoming a contractor in DevOps. It appeals to me, the ability to make more money, have a bit more control over my work.
But for those of you who have gotten into contracting... how did you do it? At what point did you know you were smart enough and knew enough, and how did you network, etc?
https://redd.it/1cfv33x
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Are you encouraging your team to switch to open standards?
I feel like every day we're still hearing about vendor lock-in and teams adopting tools and standards that make it impossible to switch vendors.
My personal hobby horse is OpenTelemetry: Even if we're going to use a vendor's monitoring tool and another vendor's metric storage/dashboards I still want it to use OTLP and the OpenTelemetry Collector. That way if we want to switch away there's at least a path to not be locked in.
Observability is just one example: there's open vs. closed datastores, internal services like queueing, and of course the (possible) death of Terraform.
As part of your work defining the technical roadmap, do you make it a point to encourage open standards?
Do you feel like managers and execs are receptive to adopting open standards? Do they see the value?
https://redd.it/1cfw4a2
@r_devops
I feel like every day we're still hearing about vendor lock-in and teams adopting tools and standards that make it impossible to switch vendors.
My personal hobby horse is OpenTelemetry: Even if we're going to use a vendor's monitoring tool and another vendor's metric storage/dashboards I still want it to use OTLP and the OpenTelemetry Collector. That way if we want to switch away there's at least a path to not be locked in.
Observability is just one example: there's open vs. closed datastores, internal services like queueing, and of course the (possible) death of Terraform.
As part of your work defining the technical roadmap, do you make it a point to encourage open standards?
Do you feel like managers and execs are receptive to adopting open standards? Do they see the value?
https://redd.it/1cfw4a2
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
How do you setup OpsGenie?
What do you think a good OpsGenie configuration would look like in order for the tool to represent a real benefit?
I've already looked through the documentation, and there are some pretty cool ideas, but I'd be curious to get some feedback on what's realistic.
How do you define the priority of an alert? What are some good escalation rules to have?
On the notification method (sms, email, etc.), since it's up to the operator to choose the method, I'd imagine it's important to recommend teams to always be reachable at OpsGenie level, and take a strong care having all notification to a person justified.
Unless there's a way of forcing a call in the event of a P1?
Also, small side-question, in the event of a major breakdown, to avoid being notified non-stop, is it possible to pause all alerts?
https://redd.it/1cfwqdk
@r_devops
What do you think a good OpsGenie configuration would look like in order for the tool to represent a real benefit?
I've already looked through the documentation, and there are some pretty cool ideas, but I'd be curious to get some feedback on what's realistic.
How do you define the priority of an alert? What are some good escalation rules to have?
On the notification method (sms, email, etc.), since it's up to the operator to choose the method, I'd imagine it's important to recommend teams to always be reachable at OpsGenie level, and take a strong care having all notification to a person justified.
Unless there's a way of forcing a call in the event of a P1?
Also, small side-question, in the event of a major breakdown, to avoid being notified non-stop, is it possible to pause all alerts?
https://redd.it/1cfwqdk
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community
Terraform, pull docker image from ECR
Hello everyone, I'm a software engineer transitioning into DevOps and recently began working with Terraform. I must say, I'm loving it! Terraform is an amazing tool. Currently, I'm working on small projects involving Lambdas, S3, and more.
My latest task was to deploy a Node.js container on an EC2 instance. I've managed to set up almost everything successfully. Here's a snippet of my EC2 instance configuration:
resource "awsinstance" "ec2instance" {
dependson = aws_iam_role.ec2_role, aws_ecr_repository.ecr_repo
ami = var.instance
instancetype = var.instancetype
subnetid = awssubnet.main.id
keyname = awskeypair.ec2keypair.keyname
vpcsecuritygroupids = [awssecuritygroup.instancesg.id]
associatepublicipaddress = var.allowpublicip
iaminstanceprofile = awsiaminstanceprofile.ec2instanceprofile.name
userdata = <<-EOF
#!/bin/bash
sudo apt update -y
sudo apt install -y docker.io awscli
sudo service docker start
aws ecr get-login-password --region ${var.region} | sudo docker login --username AWS --password-stdin ${awsecrrepository.ecrrepo.repositoryurl}
sudo docker pull ${awsecrrepository.ecrrepo.repositoryurl}
sudo docker run -d -p 80:3000 ${awsecrrepository.ecrrepo.repositoryurl}
EOF
tags = {
Name = var.instancename,
"source" = "terraform",
"environment" = terraform.workspace
}
}
The challenge I'm facing is with running the "user_data" section. The steps seem correct, and when I print the variables and execute the steps individually over SSH, everything works fine. I can even access my application. So, it appears that the steps are correct.
I've confirmed that Docker and the AWS CLI are installed, and I can successfully log in. When I SSH into the instance, I can pull the Docker image without any issues and run it.
What could I be missing? Any insights would be greatly appreciated!
https://redd.it/1cfv9ia
@r_devops
Hello everyone, I'm a software engineer transitioning into DevOps and recently began working with Terraform. I must say, I'm loving it! Terraform is an amazing tool. Currently, I'm working on small projects involving Lambdas, S3, and more.
My latest task was to deploy a Node.js container on an EC2 instance. I've managed to set up almost everything successfully. Here's a snippet of my EC2 instance configuration:
resource "awsinstance" "ec2instance" {
dependson = aws_iam_role.ec2_role, aws_ecr_repository.ecr_repo
ami = var.instance
instancetype = var.instancetype
subnetid = awssubnet.main.id
keyname = awskeypair.ec2keypair.keyname
vpcsecuritygroupids = [awssecuritygroup.instancesg.id]
associatepublicipaddress = var.allowpublicip
iaminstanceprofile = awsiaminstanceprofile.ec2instanceprofile.name
userdata = <<-EOF
#!/bin/bash
sudo apt update -y
sudo apt install -y docker.io awscli
sudo service docker start
aws ecr get-login-password --region ${var.region} | sudo docker login --username AWS --password-stdin ${awsecrrepository.ecrrepo.repositoryurl}
sudo docker pull ${awsecrrepository.ecrrepo.repositoryurl}
sudo docker run -d -p 80:3000 ${awsecrrepository.ecrrepo.repositoryurl}
EOF
tags = {
Name = var.instancename,
"source" = "terraform",
"environment" = terraform.workspace
}
}
The challenge I'm facing is with running the "user_data" section. The steps seem correct, and when I print the variables and execute the steps individually over SSH, everything works fine. I can even access my application. So, it appears that the steps are correct.
I've confirmed that Docker and the AWS CLI are installed, and I can successfully log in. When I SSH into the instance, I can pull the Docker image without any issues and run it.
What could I be missing? Any insights would be greatly appreciated!
https://redd.it/1cfv9ia
@r_devops
Reddit
From the devops community on Reddit
Explore this post and more from the devops community