GithubHelp home page GithubHelp logo

Install error (Linux, AWS) about selfhost HOT 6 CLOSED

forem avatar forem commented on July 26, 2024
Install error (Linux, AWS)

from selfhost.

Comments (6)

jdoss avatar jdoss commented on July 26, 2024 1

Task step looks for a default VPC https://github.com/forem/selfhost/blob/main/playbooks/providers/aws.yml#L41-L50. If you deleted the default one it will be blank and fail.

You can comment lines 41 to 50:

- amazon.aws.ec2_vpc_net_info:
      filters:
        "isDefault": "true"
      region: "{{ fcos_aws_region }}"
      profile: "{{ fcos_aws_profile }}"
    register: forem_vpc_info

  - name: Set forem_vpc_id fact
    ansible.builtin.set_fact:
      forem_vpc_id: "{{ forem_vpc_info['vpcs'][0]['vpc_id'] }}"

and then just pass in the VPC ID (replace vpc-1212233445566 in the example below with your AWS VPC ID) from your account in the region you are using via an extra var:

ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml -e forem_vpc_id=vpc-1212233445566

or use a region that still has a default VPC present.

from selfhost.

jdoss avatar jdoss commented on July 26, 2024 1

Hey @MakaryGo I am going to close this request for now. If you want, you can post on https://forem.dev any issues you are having with your VPC on your AWS account and maybe the community can offer more advice.

from selfhost.

MakaryGo avatar MakaryGo commented on July 26, 2024

It seemed to help, after changing region in /playbook/providers/aws.yml
Only now it crashes at another step:

TASK [Launch Forem instance for <redacted>] **********************************************************************
fatal: [forem]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: No first item, sequence was empty.

    The error appears to be in '/home/makarygo/selfhost/playbooks/providers/aws.yml': line 170, column 5, but may
    be elsewhere in the file depending on the exact syntax problem.

    The offending line appears to be:


      - name: "Launch Forem instance for {{ app_domain }}"
        ^ here
    We could be wrong, but this one looks like it might be an issue with
    missing quotes. Always quote template expression brackets when they
    start a value. For instance:

        with_items:
          - {{ foo }}

    Should be written as:

        with_items:
          - "{{ foo }}"

from selfhost.

jdoss avatar jdoss commented on July 26, 2024

I think it is having issues because vpc_subnet_id: "{{ forem_subnet_info.subnets | map(attribute='id') | list | first }}" expects a list of subnets.

- name: Gather info about VPC subnets
    amazon.aws.ec2_vpc_subnet_info:
      filters:
        vpc-id: "{{ forem_vpc_id }}"
        availability-zone: "{{ fcos_aws_region }}a"
      region: "{{ fcos_aws_region }}"
      profile: "{{ fcos_aws_profile }}"
    register: forem_subnet_info

Should get that info but if your VPC that you are using doesn't have any subnets that most likely is a problem.

Debugging your AWS account is a bit beyond our scope here so I would see if you have a default VPC on this account in this region and if not, recreate it https://aws.amazon.com/premiumsupport/knowledge-center/deleted-default-vpc/ and just use the default one if you can't figure out what is going on with your subnets on your current AWS VPC.

from selfhost.

MakaryGo avatar MakaryGo commented on July 26, 2024

Yeah, I used this AWS account log time ago for deployment of different project, I will try to deploy with other provider. Thanks for assistance and sorry for stupid questions, just never worked with Ansible before.

from selfhost.

jdoss avatar jdoss commented on July 26, 2024

No worries and no problem @MakaryGo. I think if you just tried a different region in AWS and make sure you have a default VPC you will be off the to the races.

from selfhost.

Related Issues (20)

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.