Code Monkey home page Code Monkey logo

Comments (3)

so0k avatar so0k commented on August 18, 2024

I fixed the above issue by editing playbooks/build-ami.yml and hardcoding the version string there (tempfix).

my OSX laptop was having issues resolving location of boto (I hate brew) and I decided to use a docker container to run the script. after some debugging, I managed to get a snapshot of the built disk, however ansible failed on awscli creating the ami (I guess because my awscli was configured for ap-southeast-1 region).

I noticed that the script group_vars uses us-east-1. I decided to set us-east-1 for my aws-configure as well, hoping the snapshot would be successfully converted into an AMI, but since then I've not been able to get past the following error message:

No such file or directory: u'.tmp/vyos-build-ami.pem'

I did manually created the key-pair and added the private key under that path, followed by chmod 600 on the file (avoiding the above error), but then the script still fails connecting to the Instance (I haven't been able to figure out why yet).

Here's the Dockerfile I used:

FROM alpine:3.4

RUN apk add --update bash git python python-dev py-pip build-base libffi-dev openssl-dev groff

RUN pip install awscli ansible boto
RUN git clone https://github.com/vyos/build-ami.git
WORKDIR /build-ami
RUN git submodule update --init playbooks/filter_plugins/ansible-string-split-filter

CMD ["bash"]

Build image:

docker build -t build-ami .

Running a container from that image:

docker run -it build-ami

Once in the image run aws configure and provide all details.
Review playbooks/build-ami.yml and playbooks/group_vars/all

from vyos-build-ami.

so0k avatar so0k commented on August 18, 2024

solution to my issue was to add symlink to the ssh-key dump which was in the playbook sub directory instead of the shell script directory.

ln -s $PWD/playbooks/.tmp/vyos-build-ami.pem .tmp/vyos-build-ami.pem

also, the vyos-build-ami.sh had hardcoded string playbooks/files/ssh-keys/vyos-build-ami.pem as private key, I changed it to point to correct path.

from vyos-build-ami.

so0k avatar so0k commented on August 18, 2024

seems all of these issues are specific to the vyos/build-ami fork of this repo

from vyos-build-ami.

Related Issues (4)

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.