Coder Social home page Coder Social logo

techiescamp / devops-projects Goto Github PK

View Code? Open in Web Editor NEW
1.0K 34.0 748.0 142.56 MB

DevOps Real World Projects for Aspiring DevOps Engineers [Beginner to Advanced]

Home Page: https://devopscube.com/devops-projects/

Jinja 8.39% HCL 86.38% Shell 1.62% Python 2.14% Makefile 1.47%
devops devops-learning devops-poc devops-project devops-tools practical-devops

devops-projects's Issues

error during the Jenkins Controller AMI build process

Hi, I hit an error during the Jenkins Controller AMI build process. Any suggestions for fixing it?

 amazon-ebs.jenkins: TASK [jenkins-controller : Ensure EFS volume is mounted.] **********************
**amazon-ebs.jenkins: fatal: [default]: FAILED! => {"changed": false, "msg": "Error mounting /data: mount.nfs4: Failed to resolve server fs-0a6cc59623295b5df.efs.us-west-2.amazonaws.com: No address associated with hostname\n"}**
amazon-ebs.jenkins:
amazon-ebs.jenkins: PLAY RECAP *********************************************************************
amazon-ebs.jenkins: default                    : ok=11   changed=7    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
amazon-ebs.jenkins:

==> amazon-ebs.jenkins: Provisioning step had errors: Running the cleanup provisioner, if present...
==> amazon-ebs.jenkins: Terminating the source AWS instance...
==> amazon-ebs.jenkins: Cleaning up any extra volumes...
==> amazon-ebs.jenkins: Deleting temporary security group...
==> amazon-ebs.jenkins: Deleting temporary keypair...
Build 'amazon-ebs.jenkins' errored after 3 minutes 43 seconds: Error executing Ansible: Non-zero exit status: exit status 2

==> Wait completed after 3 minutes 43 seconds

==> Some builds didn't complete successfully and had errors:
--> amazon-ebs.jenkins: Error executing Ansible: Non-zero exit status: exit status 2

==> Builds finished but no artifacts were created.

Packer Ansible Issue for Jenkins Projects

Issue 01:

amazon-ebs.jenkins: fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Unable to negotiate with 127.0.0.1 port 58791: no matching host key type found. Their offer: ssh-rsa", "unreachable": true}

Issue 02:

amazon-ebs.jenkins: fatal: [default]: FAILED! => {"msg": "failed to transfer file to /Users/bibinwilson/.ansible/tmp/ansible-local-50186_ndddr6c/tmp_1v02xx4 ~bibinwilson/.ansible/tmp/ansible-tmp-1681489405.599305-50189-81149797253717/AnsiballZ_setup.py:\n\nscp: dest open "'~bibinwilson/.ansible/tmp/ansible-tmp-1681489405.599305-50189-81149797253717/AnsiballZ_setup.py'": No such file or directory\r\nscp: failed to upload file /Users/bibinwilson/.ansible/tmp/ansible-local-50186_ndddr6c/tmp_1v02xx4 to '~bibinwilson/.ansible/tmp/ansible-tmp-1681489405.599305-50189-81149797253717/AnsiballZ_setup.py'\r\n"}

Cause

This issue is caused due to OpenSSH latest version support with anisble + packer.

References:

Solution

Thes issues can be resolved by adding extra args to the ansible provisioner as shown below.

extra_arguments = [ "--extra-vars", "ami-id=${var.ami_id} efs_mount_point=${var.efs_mount_point}", "--scp-extra-args", "'-O'", "--ssh-extra-args", "-o IdentitiesOnly=yes -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa" ]

Error running playbook: Bad configuration option 'pubkeyacceptedalgorithms'

Issue Description:
I encountered an error when running the playbook that caused the task "Gathering Facts" to fail. The error message I received was:

TASK [Gathering Facts] *********************************************************
fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: command-line: line 0: Bad configuration option: pubkeyacceptedalgorithms", "unreachable": true}

Steps to Reproduce:

  1. Execute the playbook amazon-ebs.jenkins with the provided configuration.
  2. The playbook fails at the task "Gathering Facts" with the above error message.

Resolution Attempted:
After analyzing the error message, I noticed that the error was caused by the pubkeyacceptedalgorithms configuration option. To resolve the issue, I removed this option from the configuration.

Additionally, I encountered another error during the playbook execution. The error message is as follows:

TASK [Gathering Facts] *********************************************************
fatal: [default]: FAILED! => {"msg": "failed to transfer file to /home/arun/.ansible/tmp/ansible-local-906_x273od6/tmpedzyw_iq ~arun/.ansible/tmp/ansible-tmp-1689085163.023391-911-48271443937713/AnsiballZ_setup.py:\n\nunknown option -- O\r\nusage: scp [-346BCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file]\n [-J destination] [-l limit] [-o ssh_option] [-P port]\n [-S program] source ... target\n"}

Resolution Attempted:
To overcome this error, I removed the --scp-extra-args option from the playbook.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.