-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Server support #7
Comments
In order for the rotations to start running you need a few components in place:
More information on DNS Subdelegation here: https://github.com/airbnb/ottr/tree/main/dns For each host you have in your infrastructure you will need to create a DNS Module like the examples below. The value for alias_domain_name is the same value you set here: https://github.com/airbnb/ottr/blob/main/infra/otter.tf#L3. Also note that your organization must have ownership over the Subdelegate Zone domain.
If you have any hosts that require multiple SANs you can do something like the following:
|
I setup the dns modules after which I see CNAME records mapping _acme-challenge.d1.xxx-prod.com to _acme-challenge.d1.xxxx-acme.com (sub-delegate domain). The logs under aws/lambda/otter now show scanned table and rotate certificates like so
I now see step function triggered for each linux device that was scanned and had Route53 mapping. Looking through the step function input and output, while it showed successful, the output of Platform Task Execution step had the following log output and error
Can you help debugging the above issue and the other question I had was in case of network devices, the ECS containers on fargate access the devices using the username/password set in AWS Secret Management /ottr/keyxxx, however for ubuntu we don't set any credentials so how does the container access the instance through an instance role or some other way? Thank you for the quick reply, as the documentation is limited I am trying to read through and troubleshoot as much as possible ? |
Regarding your question for the Linux platforms instead of username and password, it utilizes AWS SSM Agent to run commands on the target system. For Linux distributions the ECS Fargate container has a IAM Role that has permissions to SSM--this means is that SSM Agent must be running on your Ubuntu systems in order for Ottr to work. Amazon Linux 2 has SSM pre-installed but for other distributions you may need to manually install or do it through your configuration management system (https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-manual-agent-install.html). If you don't want to use the SSM Agent you can create your own implementation and drop it in the platforms directory (https://github.com/airbnb/ottr/tree/main/platforms), the only thing that you would need to change is within the Routes for both the API and Lambda Router you will need to change the ECS Task Definition that you are using: https://github.com/airbnb/ottr/blob/main/api/backend/app/config/route.json#L49 Additional information on creating a new module or implementation would be here: https://github.com/airbnb/ottr/blob/main/docs/CONTRIBUTE.md The error could be a number of issues, but I assume it is due to the fact SSM isn't installed on your target device. If you need deeper debugging there are CloudWatch Logs for the ECS execution in the Log Group /ecs/otter and you should see a log stream in the format /otter-linux-aws-ssm-lets-encrypt/otter/xxx. If you are still running into issues after installing SSM please let me know and I'll be glad to help look into the logs. |
I have checked for ubuntu instances that were provisioned and 18.04 AMI has SSM agent setup and running. The error in the step Function Platform Task step output had the log as shown earlier, the filtered out reason could be this
I also checked cloudwatch logs permissions for |
@seeker815 I rebuilt the environment in a sandbox account and was able to start the execution for the Ubuntu container without any issues. I noticed that you were running in ap-southeast-1 so wanted to confirm that you made the changes in the variables.tf file accordingly. The only CloudWatch Log Group that should be present within your environment should be |
@yangkenneth Yes made the change for region in variables.tf, the other coudwatch log groups were created but /ecs/otter was missing. I will go ahead and rebuild the setup if this worked for you. |
Contact Details
What happened?
I have provisioned the infra and added a couple of devices running ubuntu linux servers. Added the device to dynamoDB using Ottr API and the below payload
data = {
"system_name": "d5.xxxx-prod.com",
"common_name": "d5.xxxx-prod.com",
"certificate_authority": "lets_encrypt",
"data_center": "AWS",
"device_model": "linux",
"host_platform": "Ubuntu",
"ip_address": "10.1.60.173",
"os_version": "18.04",
}
Cloudwatch event trigger scans the DynamoDB using the lambda, the output of which is attached to the report. After that there is no trigger of step function and creation of the certificate? Are the network devices the only supported use case or Ottr also manages Ubuntu/Linux certificates?
Version
v0.0.1
Relevant Log Output
Code of Conduct
The text was updated successfully, but these errors were encountered: