agent: | Auto Exec |
What is an "Expert"? How do we create our own expert?
Add credentials for various integrations
Managing workspaces and access control
DagKnows Architecture Overview
Setting up SSO via Azure AD for Dagknows
Enable "Auto Exec" and "Send Execution Result to LLM" in "Adjust Settings" if desired
(Optionally) Add ubuntu user to docker group and refresh group membership
Deployment of an EKS Cluster with Worker Nodes in AWS
Adding, Deleting, Listing DagKnows Proxy credentials or key-value pairs
Comprehensive AWS Security and Compliance Evaluation Workflow (SOC2 Super Runbook)
AWS EKS Version Update 1.29 to 1.30 via terraform
Instruction to allow WinRM connection
MSP Usecase: User Onboarding Azure + M365
Post a message to a Slack channel
How to debug a kafka cluster and kafka topics?
Open VPN Troubleshooting (Powershell)
Execute a simple task on the proxy
Assign the proxy role to a user
Create roles to access credentials in proxy
Install OpenVPN client on Windows laptop
Setup Kubernetes kubectl and Minikube on Ubuntu 22.04 LTS
Install Prometheus and Grafana on the minikube cluster on EC2 instance in the monitoring namespace
update the EKS versions in different clusters
AI agent session 2024-09-12T09:36:14-07:00 by Sarang Dharmapurikar
Parse EDN content and give a JSON out
Check whether a user is there on Azure AD and if the user account status is enabled
Get the input parameters of a Jenkins pipeline
Ensure that the application is reachable
Check if the docker compose file is exposing the relevant port to reach to the application.
- 1hxzkCrMMd9rBWB89v0UqEnsure the container port is exposed
1
Ensure the container port is exposed
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.First check if the container port is exposed
inputsoutputsservice = "nginx" op = _exei(instance_id, "cd /home/ubuntu/dagknows_src/app_docker_compose_build_deploy") # First get the container associated with service cmd = f"sudo docker-compose -f {docker_compose_file} ps -q {service}" op = _exei(instance_id, cmd) container_id = op.split('\n')[-2].strip() # Now inspect the container cmd = f"sudo docker inspect {container_id}" op1 = _exe(instance_id, cmd) import json jsn = json.loads(op1) #print(json.dumps(jsn, indent=4)) port_str = f"{port}/tcp" exposed_ports = list(jsn[0]['Config']['ExposedPorts'].keys()) print(exposed_ports) if port_str in exposed_ports: port_is_exposed = True msg = f"Port : {port_str} is exposed by the service {service}" msg_type = "SUCCESS" else: port_is_exposed = False msg = f"Port : {port_str} is NOT exposed by the service {service}" msg_type = "ERROR" context.log(msg_type, msg) task_title = context.task_title context.job_context[task_title] = {"msg" : msg, "msg_type" : msg_type} context.skip_sub_tasks = port_is_exposedcopied1- 1.1Q5XUo4q5IOpSSACjm3FDExpose the container port
1.1
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.inputsoutputs# Here we need to edit the docker-compose file and expose the container portcopied1.1
- 2m1DLfl3VsiWv3lLMNTAuEnsure that the instance port is exposed
2
Ensure that the instance port is exposed
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.Check if the instance port is exposed in security groups. If not, modify the security group to expose the port.
inputsoutputscmd = f"aws ec2 describe-instances --instance-ids {instance_id} --query 'Reservations[0].Instances[0].SecurityGroups[*].GroupId' --output text" op = _exe(None, cmd) security_group_list = op.strip() security_group_list = security_group_list.split() print(security_group_list)copied2- 2.1seDVbAVjcqDLl5WWHRoGCheck if the instance port is open
2.1
Check if the instance port is open
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.inputsoutputsimport json import copy #port = int(port) sgl = copy.deepcopy(security_group_list) security_group_id = sgl[0] is_allowed = False for sg_id in security_group_list: cmd = f'aws ec2 describe-security-groups --filter Name=group-id,Values={sg_id} --query SecurityGroups[*].IpPermissions[*]' op = _exe(None, cmd) json_op = json.loads(op) for sg in json_op: for rule in sg: if 'FromPort' in rule: port_lo = int(rule['FromPort']) port_hi = port_lo if 'ToPort' in rule: port_hi = int(rule['ToPort']) if port >= port_lo and port <= port_hi: is_allowed = True if not is_allowed: msg = f"The inbound port {port} is BLOCKED by security groups {security_group_list}" msg_type = "ERROR" else: msg = f"The inbound port {port} is ALLOWED by security groups {security_group_list}" msg_type = "SUCCESS" context.log(msg_type, msg) print(msg) task_title = context.task_title context.job_context[task_title] = {"msg" : msg, "msg_type" : msg_type} context.skip_sub_tasks = is_allowedcopied2.1- 2.1.1IiW5Rv4LKUDxxgha3fRZExpose an inbound port on an ec2 instance
2.1.1
Expose an inbound port on an ec2 instance
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.inputsoutputs#port = int(port) cmd = f"aws ec2 authorize-security-group-ingress --group-id {security_group_id} --protocol tcp --port {port} --cidr 0.0.0.0/0" op = _exe(None, cmd) msg = f"allowing port {port} in security group {security_group_id}" print(msg) msg_type = "SUCCESS" context.log(msg_type, msg) task_title = context.task_title context.job_context[task_title] = {"msg" : msg, "msg_type" : msg_type}copied2.1.1