Giter VIP home page Giter VIP logo

selfhost's Introduction


Forem 🌱

For Empowering Community

Build Status Build Status GitHub commit activity GitHub issues ready for dev GitPod badge

Welcome to the Forem codebase, the platform that powers dev.to. We are so excited to have you. With your help, we can build out Forem’s usability, scalability, and stability to better serve our communities.

What is Forem?

Forem is open source software for building communities. Communities for your peers, customers, fanbases, families, friends, and any other time and space where people need to come together to be part of a collective. See our announcement post for a high-level overview of what Forem is.

dev.to (or just DEV) is hosted by Forem. It is a community of software developers who write articles, take part in discussions, and build their professional profiles. We value supportive and constructive dialogue in the pursuit of great code and career growth for all members. The ecosystem spans from beginner to advanced developers, and all are welcome to find their place within our community. ❀️

Table of Contents

Community

For a place to have open discussions on features, voice your ideas, or get help with general questions please visit the discussions section.

Contributing

We encourage you to contribute to Forem! Please check out the Contributing to Forem guide for guidelines about how to proceed.

Getting Started

This section provides a high-level quick start guide. If you're looking for a more thorough installation guide (for example with macOS, you'll want to refer to our complete Developer Documentation.

We run on a Rails backend, and we are currently transitioning to a Preact-first frontend.

A more complete overview of our stack is available in our docs.

To launch Forem in Gitpod, navigate to https://gitpod.io/#https://github.com/{your_github_username}/forem.

Installation Documentation

Please see our installation guides:

Developer Documentation

Check out our dedicated docs page for more technical documentation.

Vulnerability disclosure

Forem is the open source software which powers DEV.

We welcome security research on DEV under the terms of our vulnerability disclosure policy.

Acknowledgements

Thank you to the Twemoji project for the usage of their emojis.

Thank you to Uffizzi for providing ephemeral environments to preview pull requests.

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Please see the LICENSE file in our repository for the full text.

Like many open source projects, we require that contributors provide us with a Contributor License Agreement (CLA). By submitting code to the Forem project, you are granting us a right to use that code under the terms of the CLA.

Our version of the CLA was adapted from the Microsoft Contributor License Agreement, which they generously made available to the public domain under Creative Commons CC0 1.0 Universal.

Any questions, please refer to our license FAQ doc or email [email protected].


Sloan, the sloth mascot
Happy Coding ❀️

⬆ Back to Top

selfhost's People

Contributors

akhil-naidu avatar andygeorge avatar benhalpern avatar citizen428 avatar cmgorton avatar creekorful avatar djuber avatar jdoss avatar klardotsh avatar nickytonline avatar tivin-i avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selfhost's Issues

bin/startup issue

Hi ,

After i ran the bin/startup i am getting below the error in the browser. Any one let me know the issue.

image

Can i add script in head tag?

I would like to add custom script in head and body tag. Is that possible in selfhost?

And also is that any way to upload file in root folder? I would like to upload ads.txt file in root folder.

Link in Readme to paid hosting is broken.

Hey folks,

This link is broken. Didn't want to just delete the line via a PR in case y'all have plans for swapping it out. For the record my org would love to chat with you about this option.

"Launch Forem instance for {{ app_domain }}" fails

Hi there, nearly there with this now. Just this error with ec2 instance creation. I have the values that make up app_domain set in my setup.yml file

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 '/Users/lee/Documents/Productions/Git.nosync/forem/selfhost/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 }}"

For AWS, default the EBS from 100 GB to 30GB

Its default is 100 GB and this means snapshots will take a long time when creating AMIs.
EBS snapshots are a common hidden cost that can add up quickly on AWS

  vars:
    fcos_arch: x86_64
    fcos_platform: aws
    fcos_format: vmdk.xz
    fcos_stream: stable
    fcos_aws_region: us-east-1
    fcos_aws_size: t3a.small
    fcos_aws_ebs_size: 100
    fcos_aws_profile: forem-selfhost
    butane_cleanup: true
    ssh_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"

Free Tier is 30 GB, So I would like to suggest this as the default.

Screen Shot 2021-07-22 at 2 27 26 PM

S3 permissions not updated on repeated runs leads to server initialization error

Describe the bug
S3 permissions not updated on repeated runs leads to server initialization error.

When I ran ansible for the first time, for some reason I didn't set it up properly and ran it a second time, the S3 permissions were not updated. This resulted in the following image. forem.ign failed to download and resulted in a system initialization error

To Reproduce
Steps to reproduce the behavior:

  1. Run ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml
  2. Delete the old EC2 Instance
  3. Rerun ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml
  4. Goto AWS dashboard show system logs
  5. See an error

Screenshots
3hV5IHqnVM

OS (please complete the following information):

  • MacOS

Cloud Provider (please complete the following information):

  • AWS

Additional context
Add any other context about the problem here.

setup.yml file is empty

Hello,

After i run the command "./setup" the setup.yml file is empty and probably is cased by ansible-vault

Any help please.

./setup: line 40: xxd: command not found
Reading plaintext input from stdin. (ctrl-d to end input, twice if your content does not already have a newline)
usage: ansible-vault [-h] [--version] [-v] {create,decrypt,edit,view,encrypt,encrypt_string,rekey} ...

encryption/decryption utility for Ansible data files

positional arguments:
  {create,decrypt,edit,view,encrypt,encrypt_string,rekey}
    create              Create new vault encrypted file
    decrypt             Decrypt vault encrypted file
    edit                Edit vault encrypted file
    view                View vault encrypted file
    encrypt             Encrypt YAML file
    encrypt_string      Encrypt a string
    rekey               Re-key a vault encrypted file

options:
  --version             show program's version number, config file location, configured module search path,
                        module location, executable location and exit
  -h, --help            show this help message and exit
  -v, --verbose         verbose mode (-vvv for more, -vvvv to enable connection debugging)

See 'ansible-vault <command> --help' for more information on a specific command.
ERROR! stdin was empty, not encrypting```

Install error (Linux, AWS)

Describe the bug
When trying to set it up according to the instructions, it crashes at step

fatal: [forem]: FAILED! =>
  msg: |-
    The task includes an option with an undefined variable. The error was: list object has no element 0

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

    The offending line appears to be:


      - name: Set forem_vpc_id fact
        ^ here

To Reproduce
ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml

OS (please complete the following information):

  • Linux

Cloud Provider (please complete the following information):

  • AWS

How to access my Forem droplet files trough sftp ?

Hello,

I was able to run a forum instance on a digital ocean droplet.
I'm wondering now how I can access this servers files trough the sftp in FileZilla for example.

I was unable to to replace the .ico file for example or I want to change some text I found on my instance, so I need to access the files from the server in order to modify them.

I was able to connect with FileZilla, but I don't know in what folder the Forem is and also many of the server folder does not open because it says that I do not have access. I'm using the key login with the "core" username.

Any help ? :)

Feedback & Confusion while installling forem selfhost

I was trying to install forem selfhost in AWS Fedora CoreOs. and following instructions.

Document - https://github.com/forem/selfhost/

Background - I am using following region in AWS with following AMI ID

  • Region: ap-south-1
    Release: 34.20210626.3.1
    Image: ami-0de887f898b8b9edf

Confusion#1 - Big Confusion in "WORKSTATION" and VMs for AWS? Instructions is so confusing where we should run which one?

Confusion#2 - Step 1-7 - I run in AWS VMs of Fedora CoreOS where i am installing forem but Suddenly Step 8 - "on your workstation" change entire senario of my understanding?

Confusion#2 - Soneone need to explin that What you are trying to do?

  1. Are you creating AWS Ec2 instance using ansble script and installing Forem in the NEW AWS EC2 instance created by script??
    or
  2. Are you trying to RUN Step 1-11 in the Ec2 instance where Forem should be installed?

Readme updates based on setup feedback

After an internal walkthrough by @cmgorton, we have some feedback to make some things a little clearer in the setup docs:

  • add explicit pip3 install ansible step
  • add ssh-add step after ssh-keygen
  • separate the quick setup steps into macOS vs Linux
  • add notes to each provider that let you know where your Forem VM lives at (looking at you, AWS EC2)
  • add note about Digital Ocean "Authentication contexts" to make that clearer

Failed to parse /var/home/core/selfhost/inventory/forem/setup.yml

`$ ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml
[WARNING]: * Failed to parse /var/home/core/selfhost/inventory/forem/setup.yml with ini plugin: Invalid host pattern '---' supplied, '---' is normally a sign this is
a YAML file.
[WARNING]: * Failed to parse /var/home/core/selfhost/inventory/forem/setup.yml with yaml plugin: We were unable to read either as JSON nor YAML, these are the errors
we got from each: JSON: Expecting value: line 1 column 1 (char 0) Syntax Error while loading YAML. could not find expected ':' The error appears to be in
'/var/home/core/selfhost/inventory/forem/setup.yml': line 85, column 11, but may be elsewhere in the file depending on the exact syntax problem. The offending line
appears to be: $ANSIBLE_VAULT;1.1;AES256 62376137383864393461613561353234643230666431643935303533346631393537363564366334 ^ here
[WARNING]: Unable to parse /var/home/core/selfhost/inventory/forem/setup.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [Deploy Forem to AWS] *********************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP *************************************************************************************************************************************************************

[core@ip-172-31-9-59 selfhost]$
`

fcos_extraction_location is not created before extracting into it

Describe the bug

When installing for QEMU/libvirt on linux.

The fcos_extraction_location defaults to "$HOME/.local/share/libvirt/images".

If this directory does not exist, the "Stat FCOS extract file" step does not fail (shows ok: [forem]), the Extract FCOS image with xz setup fails (because nothing creates the location if it does not exist)

TASK [fcos : Extract FCOS file to $HOME/.local/share/libvirt/images with xz] ****************************
fatal: [forem]: FAILED! => changed=true 
  cmd: xz --decompress -k /home/djuber/src/selfhost/playbooks/providers/images/fedora-coreos-34.20210725.3.0-qemu.x86_64.qcow2.xz -c > $HOME/.local/share/libvirt/images/fedora-coreos-34.20210725.3.0-qemu.x86_64.qcow2
  delta: '0:00:00.001628'
  end: '2021-08-20 11:05:44.692859'
  msg: non-zero return code
  rc: 2
  start: '2021-08-20 11:05:44.691231'
  stderr: '/bin/sh: 1: cannot create /home/djuber/.local/share/libvirt/images/fedora-coreos-34.20210725.3.0-qemu.x86_64.qcow2: Directory nonexistent'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

To Reproduce
Steps to reproduce the behavior:

  1. rm -rf $HOME/.local/share/libvirt/images - if there is anything you care about in there, maybe mv instead of rm :)
  2. run the qemu install playbook ansible-playbook -i inventory/forem/setup.yml playbooks/providers/qemu.yml
  3. observe the failure on the above step

Expected behavior

The fcos_extract_location directory is checked for existence, and either an earlier error with instructions to create the directory, or automatic directory creation occurs when it's not there.

Screenshots
If applicable, add screenshots to help explain your problem.

OS (please complete the following information):

  • Linux

Cloud Provider (please complete the following information):

  • Other: QEMU/libvirt

Where are the production logs?

I ran into a 500 error and so I figured I should setup streaming logs to CloudWatch Logs.

When I entered the rails container sudo podman exec -it forem-rails /bin/bash

and I tried to tail the logs tail -f log/production.log They were empty.

I set up HoneyBadger but this is only a temporary solution.

I could not determine where are the logs in the forem.yml.j2. I can see they should get set to Stdout.

Can I have a Linux command and location where I can observe the logs on a self-hosted production server?
I think if I can observe the logs I'll be able to do the rest myself.

Fedora CoreOS is compulsory? Why not Ubuntu or centos?

From last 2 hours, I am trying to understand a documents for installation and found that many confusion in the installation flow. I feel it need to rewrite flow.

On top of, Fedora CoreOS is comsulsory? Why not Ubuntu or centos?

Failed to login using API token, please verify validity of API token

Hello,

I run into an error while I try to run the digitalocean playbook. I followed all the instruction and the dotcli is able to create and remove depletes on DO, but the error is not very specific with the key issue.

Any help please?

[WARNING]: Collection amazon.aws does not support Ansible version 2.11.12

PLAY [Deploy Forem to DigitalOcean] ********************************************************************************************************************************************************************************

TASK [Gathering Facts] *********************************************************************************************************************************************************************************************
ok: [forem]

TASK [Check for doctl] *********************************************************************************************************************************************************************************************
changed: [forem]

TASK [Fail if doctl is not installed] ******************************************************************************************************************************************************************************
skipping: [forem]

TASK [Check doctl account get] *************************************************************************************************************************************************************************************
changed: [forem]

TASK [Fail if doctl account get fails] *****************************************************************************************************************************************************************************
skipping: [forem]

TASK [Include vars from doctl/config.yaml into the 'doctl_check' variable"] ****************************************************************************************************************************************
ok: [forem]

TASK [Set doctl facts] *********************************************************************************************************************************************************************************************
ok: [forem]

TASK [preflight : Fetch public WAN IPv4 address json] **************************************************************************************************************************************************************
ok: [forem]

TASK [preflight : Set local_wan_ip_address fact] *******************************************************************************************************************************************************************
ok: [forem]

TASK [preflight : Verify Ansible is >= 2.11.0] *********************************************************************************************************************************************************************
ok: [forem] => changed=false 
  msg: All assertions passed

TASK [preflight : Get list of installed Python 3 packages] *********************************************************************************************************************************************************
changed: [forem]

TASK [preflight : Read requirements.txt] ***************************************************************************************************************************************************************************
ok: [forem]

TASK [preflight : Generate list of missing pip prerequisites] ******************************************************************************************************************************************************
ok: [forem]

TASK [preflight : Generate list of missing python packages] ********************************************************************************************************************************************************
ok: [forem]

TASK [preflight : Verify that required Python 3 packages are installed] ********************************************************************************************************************************************
ok: [forem] => changed=false 
  msg: All assertions passed

TASK [Get FCOS facts] **********************************************************************************************************************************************************************************************

TASK [fcos : Get FCOS releases] ************************************************************************************************************************************************************************************
ok: [forem]

TASK [fcos : Set FCOS file download facts] *************************************************************************************************************************************************************************
ok: [forem]

TASK [Gather information about all images] *************************************************************************************************************************************************************************
fatal: [forem]: FAILED! => changed=false 
  msg: Failed to login using API token, please verify validity of API token.

PLAY RECAP *********************************************************************************************************************************************************************************************************
forem  ```

SMTP email service is not working

Configured Email Server Settings (SMTP) from from admin panel through Customization/Config with mailgun as service provider. After inviting a member it showed "The invite has been sent to the user's email." but the email did not received and in backend there is a timeout error happening

Steps to reproduce the behaviour :

  1. Go to '/admin/customization/config'
  2. Configured Email Server Settings (SMTP) with mailgun as service provider (Authentication:Plain, Port:465)
  3. Got to '/admin/member_manager/invitations/new' submit email address and it will show the email was sent
  4. Go to the instance console of your cloud provider where the forem is hosted and hit 'journalctl -f -u forem-rails.service' there will be a timeout error
  5. Error log :
    Error log.txt

Expected behaviour :
The email should receive

OS : Linux

Cloud Provider : AWS

Additional context :
Tried with Sendgrid and same timeout error is occurring, Changing port is not making any changes

Sir can i use amazon lightsail or vultr to self host forem please reply

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

OS (please complete the following information):

  • Linux
  • MacOS

Cloud Provider (please complete the following information):

  • AWS
  • DigitalOcean
  • Google Cloud Provider
  • Other

Sir can i use amazon lightsail or vultr to self host forem please reply
Additional context
Add any other context about the problem here.

DigitalOcean provider playbook: doctl compute image create step is not skipped & image creation always fails

I'm trying to set up Forem with the DigitalOcean provider playbook and keep hitting a wall on the "doctl compute image create" step.
I can see that the correct custom image has been created in the first run of the playbook (it's visible with "doctl compute image list" via CLI, and I can see it in the web-based UI at DO), but the playbook keeps insisting on re-creating it (and subsequently times out). Every time I run it, a new image with the same name (at the time of writing, fcos-36.20220806.3.0) is created at my DO custom image store.

Also, the sequence of things looks a little odd to me:

TASK [Create FCOS image] **********************************************************************************************************************************************
changed: [forem]

TASK [Skip doctl compute image create step if image already exists] ***************************************************************************************************
skipping: [forem]

Shouldn't the "Skip" task be executed before the "Create Image" task?

Confirmation / Documentation of variables in setup.yml

Hi All,

Understand that the platform is moving fast in terms of development, but is there any documentation around some of the config variables? i.e. What circumstances they are used / what they connect to and for what purpose. I notice theres a slack channel / api - but I can't find out what triggers this.

Cheers,
SCR-20221007-oyz-2

Alex.

I get 404 page not found after following the guide

Describe the bug
I get 404 page not found instead of creating an admin account page

To Reproduce
Steps to reproduce the behavior:
Follow @jdoss https://www.youtube.com/watch?v=af7N_-M1-3Y and deploy on GCP
As the final step restart traefik service on server
Open domain see no ssl certificate installed and 404 page not found error.

Expected behavior
Register first user page

Screenshots
image

OS (please complete the following information):

  • Ubuntu

Cloud Provider (please complete the following information):

  • Google Cloud Provider

Additional context
Add any other context about the problem here.
This guy has the same problem -> here

Google Cloud missing in requirements.yml

Describe the bug
During the MLH workshop we noticed that Google Cloud is missing from the requirements.yml file so using ansible-galaxy collection install -r requirements.yml as mentioned in the docs would not work to install the Google Cloud collection.

To Reproduce
Steps to reproduce the behavior:

  1. Go to requirements.yml
  2. See that there is no Google Cloud mentioned in the file.

GIFs are broken in Forem Cloud/Self-Host

Check out this post in forem.dev for more information. You can clearly identify that the cover image is not being displayed. Even though the GIF can be seen in the draft.

All the links => Uploaded GIF URL, Resized URL, CoverImage as GIF and Embedded GIF can be seen in the post.

Probable reason

Within imgproxy there is some issue, because I can view the image in the draft and the preview screen. This tell me that there is no problems with uploading and cropping, so it should be related to fetching.

Another reason; Why I think it is related to imgproxy.

Leeawrdslope is a Forem based community, but not using the traditional self-hosting guide. It is based on dokku and doesn't use imgproxy; for image caching and resizing we are using Cloudinaries Immaga Plugin.

Here is a post on Leewardslope, which holds a GIF as cover

Missing AWS key pair pem file

It automatically generates AWS key pair / pem file. However required pem file is missing. Which is needed in order to reach the server through SSH.

Images not loading behind VPN

Describe the bug
When the host machine has 443 and 80 access to our VPN IP's .Text and everything is working fine. Images get uploaded but they don't show on the page. Once I whitelist 443 and 80 to the world, images starts loading.

I have used ansible script and using AWS for the same.

I am also attaching the screenshot of the errors:

Screenshot 2022-04-07 at 8 20 41 PM

Error for container imgproxy:

WARNING [2022-04-07T14:50:31Z] Completed in 5.000591964s /6DQjwvTRTleSWBhfCREAbcPmlqS37kfcE3QQxSQH5Cg/w:880/mb:500000/ar:1/aHR0cHM6Ly9hc2su/bmZlcmVuY2UubmV0/L3VwbG9hZHMvYXJ0/aWNsZXMvZXV4Mmp3/bTdmOGtkZ3ozNzY2/cmUucG5n?i=i request_id=QeiphVP2f5CbLu0wUuna0 method=GET status=404 error="The image request timed out"
INFO [2022-04-07T14:50:31Z] Started /6DQjwvTRTleSWBhfCREAbcPmlqS37kfcE3QQxSQH5Cg/w:880/mb:500000/ar:1/aHR0cHM6Ly9hc2su/bmZlcmVuY2UubmV0/L3VwbG9hZHMvYXJ0/aWNsZXMvZXV4Mmp3/bTdmOGtkZ3ozNzY2/cmUucG5n request_id=dU7rTfyAvpxOhzf601AAh method=GET
WARNING [2022-04-07T14:50:36Z] Completed in 5.002901923s /6DQjwvTRTleSWBhfCREAbcPmlqS37kfcE3QQxSQH5Cg/w:880/mb:500000/ar:1/aHR0cHM6Ly9hc2su/bmZlcmVuY2UubmV0/L3VwbG9hZHMvYXJ0/aWNsZXMvZXV4Mmp3/bTdmOGtkZ3ozNzY2/cmUucG5n request_id=dU7rTfyAvpxOhzf601AAh method=GET status=404 error="The image request timed out"

Logs for openresty:

127.0.0.1 - - [07/Apr/2022:14:45:01 +0000] "GET /images/6DQjwvTRTleSWBhfCREAbcPmlqS37kfcE3QQxSQH5Cg/w:880/mb:500000/ar:1/aHR0cHM6Ly9hc2su/bmZlcmVuY2UubmV0/L3VwbG9hZHMvYXJ0/aWNsZXMvZXV4Mmp3/bTdmOGtkZ3ozNzY2/cmUucG5n HTTP/1.1" 404 27 "{host}/newws-413n" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.60 Safari/537.36" "ip-addr" "/images/6DQjwvTRTleSWBhfCREAbcPmlqS37kfcE3QQxSQH5Cg/w:880/mb:500000/ar:1/aHR0cHM6Ly9hc2su/bmZlcmVuY2UubmV0/L3VwbG9hZHMvYXJ0/aWNsZXMvZXV4Mmp3/bTdmOGtkZ3ozNzY2/cmUucG5n" "MISS"

Butane is not installed

Describe the bug
After configuring the setup, and using the playbook to install Forem in DigitalOcean using the command ansible-playbook -i inventory/forem/setup.yml playbooks/providers/digitalocean.yml, I am facing the Ansible execution error:

  msg: 'Butane is not installed or not in your $PATH! You need to install it first. See: https://coreos.github.io/butane/getting-started/'

To Reproduce
Steps to reproduce the behavior:

  1. Follow Forem selfhost setup guide
  2. See error

Expected behavior
The playbook should run successfully.

OS (please complete the following information):

  • Linux (running on Fedora)

Cloud Provider (please complete the following information):

  • DigitalOcean

Additional context
Playbook Execution Log:

[root@e2fdfc5cd8ad selfhost]# ansible-playbook -i inventory/forem/setup.yml playbooks/providers/digitalocean.yml

PLAY [Deploy Forem to DigitalOcean] ***********************************************************************************************

TASK [Gathering Facts] ************************************************************************************************************
ok: [forem]

TASK [Check for doctl] ************************************************************************************************************
changed: [forem]

TASK [Fail if doctl is not installed] *********************************************************************************************
skipping: [forem]

TASK [Check doctl account get] ****************************************************************************************************
changed: [forem]

TASK [Fail if doctl account get fails] ********************************************************************************************
skipping: [forem]

TASK [Include vars from doctl/config.yaml into the 'doctl_check' variable"] *******************************************************
ok: [forem]

TASK [Set doctl facts] ************************************************************************************************************
ok: [forem]

TASK [preflight : Fetch public WAN IPv4 address json] *****************************************************************************
ok: [forem]

TASK [preflight : Set local_wan_ip_address fact] **********************************************************************************
ok: [forem]

TASK [preflight : Verify Ansible is >= 2.11.0] ************************************************************************************
ok: [forem] => changed=false 
  msg: All assertions passed

TASK [preflight : Get list of installed Python 3 packages] ************************************************************************
changed: [forem]

TASK [preflight : Read requirements.txt] ******************************************************************************************
ok: [forem]

TASK [preflight : Generate list of missing pip prerequisites] *********************************************************************
ok: [forem]

TASK [preflight : Generate list of missing python packages] ***********************************************************************
ok: [forem]

TASK [preflight : Verify that required Python 3 packages are installed] ***********************************************************
ok: [forem] => changed=false 
  msg: All assertions passed

TASK [Get FCOS facts] *************************************************************************************************************

TASK [fcos : Get FCOS releases] ***************************************************************************************************
ok: [forem]

TASK [fcos : Set FCOS file download facts] ****************************************************************************************
ok: [forem]

TASK [Gather information about all images] ****************************************************************************************
ok: [forem]

TASK [Create FCOS image] **********************************************************************************************************
skipping: [forem]

TASK [Skip doctl compute image create step if image already exists] ***************************************************************
ok: [forem] => 
  msg: An image named fcos-35.20220410.3.1 already exists. Skipping doctl compute image create step!

TASK [Wait for fcos-35.20220410.3.1 to be created] ********************************************************************************
ok: [forem]

TASK [Set FCOS DO Image ID fact] **************************************************************************************************
ok: [forem]

TASK [Convert butane file to an Ignition file] ************************************************************************************

TASK [butane : Check for butane] **************************************************************************************************
fatal: [forem]: FAILED! => changed=true 
  cmd: which butane
  delta: '0:00:00.002587'
  end: '2022-04-30 16:30:08.723261'
  msg: non-zero return code
  rc: 1
  start: '2022-04-30 16:30:08.720674'
  stderr: 'which: no butane in (/root/.local/bin:/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
...ignoring

TASK [butane : Fail if butane is not installed] ***********************************************************************************
fatal: [forem]: FAILED! => changed=false 
  msg: 'Butane is not installed or not in your $PATH! You need to install it first. See: https://coreos.github.io/butane/getting-started/'

PLAY RECAP ************************************************************************************************************************
forem                      : ok=20   changed=4    unreachable=0    failed=1    skipped=3    rescued=0    ignored=1   

Changing the domain URL

Hey guys, First of all, Thanks for the great product. We are exploring the Forem for a couple of weeks now after self-hosting it in AWS with a subdomain of existing domain and it works great. Now, we would like to configure to a new domain, it would be really helpful if you guys could help me to change the domain.

Using /bin/container-setup failed

 Started POST "/__better_errors/3ec715cac561429f/variables" for 172.19.0.1 at 2023-08-17 18:05:58 +0000
forem_seed             | rake aborted!
forem_seed             | NoMethodError: undefined method `protocol' for nil:NilClass
forem_seed             | 
forem_seed             |             "#{request.protocol}#{host}"

SSH task hangs then fails

At first, I checked the EC2 / security group, it is good to go, 22 is open to local IP.

Here is the error log:

TASK [Wait 300 seconds for port 22 to become open] ********************************************************************

fatal: [forem]: FAILED! => changed=false
  elapsed: 300
  invocation:
    module_args:
      active_connection_states:
      - ESTABLISHED
      - FIN_WAIT1
      - FIN_WAIT2
      - SYN_RECV
      - SYN_SENT
      - TIME_WAIT
      connect_timeout: 5
      delay: 20
      exclude_hosts: null
      host: XX.XX.XX.XX
      msg: null
      path: null
      port: 22
      search_regex: null
      sleep: 1
      state: started
      timeout: 300
  msg: Timeout when waiting for  XX.XX.XX.XX

PLAY RECAP ************************************************************************************************************
forem                      : ok=41   changed=17   unreachable=0    failed=1    skipped=1    rescued=0    ignored=0

I'm not sure what's the error here.

ERROR! couldn't resolve module/action 'amazon.aws.ec2'. This often indicates a misspelling, missing collection, or incorrect module path.

I did this last week for a different client and everything worked as expected (eventually).
I've even nuked the VM I am working from and started completely from scratch five times so far.
I am doing this on the most recent version of Ubuntu Desktop from within a Virtualbox VM.
Please help me. I am at my wits' end.

Here are the steps I performed:
(I have been at this for hours so may have forgotten to document one or more step below)

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible
sudo apt install python3-pip
sudo apt install podman
sudo apt install pwgen
podman pull quay.io/coreos/butane:release
sudo apt install git
git clone https://github.com/forem/selfhost.git
cd selfhost
./setup

-- added the vault keys including the silly indents with exactly the correct number of spaces.
-- added the domain, subdomain and default email.

ansible-galaxy collection install -r requirements.yml
ssh-keygen -t rsa
pip3 install boto boto3 botocore

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

aws configure --profile forem-selfhost

ansible-playbook -i inventory/forem/setup.yml playbooks/providers/aws.yml

Then I get an error:
_ERROR! couldn't resolve module/action 'amazon.aws.ec2'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/doug/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 }}"_

Thanks.
Doug Melvin

Forem self-host with QEMU error

Hello,

Anyone is getting this issue when deploying using QEMU on Fedora 37 and Fedora 38?

# ansible-playbook -i inventory/forem/setup.yml playbooks/providers/qemu.yml

PLAY [Build Forem on QEMU] ****************************************************************************************************************************

TASK [preflight : Fetch public WAN IPv4 address json] *************************************************************************************************
ok: [forem]

TASK [preflight : Set local_wan_ip_address fact] ******************************************************************************************************
ok: [forem]

TASK [preflight : Verify Ansible is >= 2.11.0] ********************************************************************************************************
ok: [forem] => changed=false
  msg: All assertions passed

TASK [preflight : Get list of installed Python 3 packages] ********************************************************************************************
changed: [forem]

TASK [preflight : Read requirements.txt] **************************************************************************************************************
ok: [forem]

TASK [preflight : Generate list of missing pip prerequisites] *****************************************************************************************
ok: [forem]

TASK [preflight : Generate list of missing python packages] *******************************************************************************************
ok: [forem]

TASK [preflight : Verify that required Python 3 packages are installed] *******************************************************************************
ok: [forem] => changed=false
  msg: All assertions passed

TASK [fcos : Get FCOS facts] **************************************************************************************************************************
included: /opt/services/forem/roles/fcos/tasks/facts.yml for forem

TASK [fcos : Get FCOS releases] ***********************************************************************************************************************
ok: [forem]

TASK [fcos : Set FCOS file download facts] ************************************************************************************************************
ok: [forem]

TASK [fcos : Download FCOS files] *********************************************************************************************************************
included: /opt/services/forem/roles/fcos/tasks/download.yml for forem

TASK [fcos : Check for FCOS file download] ************************************************************************************************************
ok: [forem]

TASK [fcos : Check if fcos_storage_location exists] ***************************************************************************************************
skipping: [forem]

TASK [fcos : Fail if fcos_storage_location does not exist] ********************************************************************************************
skipping: [forem]

TASK [fcos : Create temporary FCOS download directory] ************************************************************************************************
skipping: [forem]

TASK [fcos : Download FCOS files] *********************************************************************************************************************
skipping: [forem] => (item={'url': 'https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/37.20230401.3.0/x86_64/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2.xz', 'filename': 'fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2.xz'})
skipping: [forem] => (item={'url': 'https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/37.20230401.3.0/x86_64/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2.xz.sig', 'filename': 'fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2.xz.sig'})
skipping: [forem] => (item={'url': 'https://fedoraproject.org/fedora.gpg', 'filename': 'fedora.gpg'})

TASK [fcos : Get sha256 of FCOS download file] ********************************************************************************************************
skipping: [forem]

TASK [fcos : Import Fedora GPG key] *******************************************************************************************************************
skipping: [forem]

TASK [fcos : Verify FCOS file download via GPG] *******************************************************************************************************
skipping: [forem]

TASK [fcos : Verify sha256sum of FCOS download] *******************************************************************************************************
skipping: [forem]

TASK [fcos : Move FCOS file download to fcos_storage_location] ****************************************************************************************
skipping: [forem]

TASK [fcos : Extract FCOS image] **********************************************************************************************************************
included: /opt/services/forem/roles/fcos/tasks/extract.yml for forem

TASK [fcos : Check for FCOS file download] ************************************************************************************************************
ok: [forem]

TASK [fcos : Fail if /opt/services/forem/playbooks/providers/images/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2.xz does not exist] ****************
skipping: [forem]

TASK [fcos : Stat FCOS extract file] ******************************************************************************************************************
ok: [forem]

TASK [fcos : Stat FCOS compressed file] ***************************************************************************************************************
ok: [forem]

TASK [fcos : Print skip extraction warning when $HOME/.local/share/libvirt/images/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2 exists] *************
ok: [forem] =>
  msg: The extracted file $HOME/.local/share/libvirt/images/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2.xz exists!! Skipping extraction!

TASK [fcos : Check for unxz] **************************************************************************************************************************
skipping: [forem]

TASK [fcos : Fail if unxz is not installed] ***********************************************************************************************************
skipping: [forem]

TASK [fcos : Extract FCOS file to $HOME/.local/share/libvirt/images with xz] **************************************************************************
skipping: [forem]

TASK [Convert butane file to an Ignition file] ********************************************************************************************************

TASK [butane : Check for butane] **********************************************************************************************************************
changed: [forem]

TASK [butane : Fail if butane is not installed] *******************************************************************************************************
skipping: [forem]

TASK [butane : Create temporary butane file] **********************************************************************************************************
changed: [forem]

TASK [butane : Copy Butane YAML into temporary file] **************************************************************************************************
changed: [forem]

TASK [butane : Transpile Butane YAML into JSON] *******************************************************************************************************
changed: [forem]

TASK [butane : Create temporary Butane Ignition JSON file] ********************************************************************************************
changed: [forem]

TASK [butane : Copy Butane input JSON into temporary Butane Ignition file] ****************************************************************************
changed: [forem]

TASK [butane : Gzip ignition data] ********************************************************************************************************************
changed: [forem]

TASK [butane : Register butane_ignition facts] ********************************************************************************************************
ok: [forem]

TASK [butane : Create temporary boot Butane file] *****************************************************************************************************
changed: [forem]

TASK [butane : Copy boot Butane YAML into boot Butane file] *******************************************************************************************
changed: [forem]

TASK [butane : Transpile Butane into Ignition] ********************************************************************************************************
changed: [forem]

TASK [butane : Create temporary boot Ignition file] ***************************************************************************************************
changed: [forem]

TASK [butane : Copy Butane boot JSON into temporary Butane Ignition file] *****************************************************************************
changed: [forem]

TASK [butane : Gzip ignition data] ********************************************************************************************************************
changed: [forem]

TASK [butane : Register butane_boot_ignition facts] ***************************************************************************************************
ok: [forem]

TASK [butane : ansible.builtin.file] ******************************************************************************************************************
skipping: [forem] => (item=/tmp/butane_input_jkaou0yh.bu)
skipping: [forem] => (item=/tmp/butane_input_14_vqcjw.ign)

TASK [Create QEMU Fedora CoreOS VM] *******************************************************************************************************************
fatal: [forem]: FAILED! => changed=true
  cmd: |-
    qemu-kvm -m 2048 -cpu host -snapshot -daemonize -drive if=virtio,file=$HOME/.local/share/libvirt/images/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2 -fw_cfg name=opt/com.coreos/config,file=/tmp/butane_input_14_vqcjw.ign -nic user,model=virtio,hostfwd=tcp::2222-:22,hostfwd=tcp::9090-:9090
  delta: '0:00:00.262092'
  end: '2023-04-25 10:12:59.793747'
  msg: non-zero return code
  rc: 1
  start: '2023-04-25 10:12:59.531655'
  stderr: gtk initialization failed
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

PLAY RECAP ********************************************************************************************************************************************
forem                      : ok=33   changed=14   unreachable=0    failed=1    skipped=15   rescued=0    ignored=0

[root@forem forem]#

Then, i also tried to run specific command, but getting this error.

[root@forem forem]# qemu-kvm -m 2048 -cpu host -snapshot -daemonize -drive if=virtio,file=$HOME/.local/share/libvirt/images/fedora-coreos-37.20230401.3.0-qemu.x86_64.qcow2 -fw_cfg name=opt/com.coreos/config,file=/tmp/butane_input_14_vqcjw.ign -nic user,model=virtio,hostfwd=tcp::2222-:22,hostfwd=tcp::9090-:9090
gtk initialization failed
[root@forem forem]#

Thank you.

no able to connect with ssh

Hello,

I'm unable to connect with shh on the droplet created by Forem.
I've tried with the root and core username but i get this:
Permission denied (publickey,gssapi-with-mic).

For AWS deployment, is it a good idea to auto assign an elastic IP during the build?

Hi there,

Test deployed into AWS numerous times in various conditions, works great! Just thought of this though:

I noticed that when deployed, the ec2 instance receives a standard nonpersistent public IP that refreshes on reboot and during other conditions.

Have you considered auto-assigning an elastic IP? They are free when attached to an ec2 instance and persist through reboots and changes and can be moved to other instances

forem Install Error: Transpile Butane YAML into JSON

TASK [butane : Transpile Butane YAML into JSON] ************************************************************************************************************************
fatal: [forem]: FAILED! => changed=true
cmd: |-
butane --strict "/tmp/butane_input_ajt1wc2f.bu"
delta: '0:00:00.061281'
end: '2021-07-18 00:11:02.752356'
msg: non-zero return code
rc: 1
start: '2021-07-18 00:11:02.691075'
stderr: 'Error translating config: Error unmarshaling yaml: yaml: line 501: found character that cannot start any token'
stderr_lines:
stdout: ''
stdout_lines:

PLAY RECAP *************************************************************************************************************************************************************
forem : ok=14 changed=4 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

The role 'preflight' was not found

Describe the bug

ERROR! the role 'preflight' was not found in amazon.aws:community.aws:community.general:ansible.legacy:/mnt/c/Users/*/selfhost/playbooks/providers/roles:/home/*/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/mnt/c/Users/johnc/selfhost/playbooks/providers

The error appears to be in '/mnt/c/Users/*/selfhost/playbooks/providers/aws.yml': line 24, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
    - preflight
      ^ here

To Reproduce
Steps to reproduce the behavior:

  1. Do the AWS setup
  2. Run AWS playbook

Expected behavior
Proper AWS setup

Screenshots
If applicable, add screenshots to help explain your problem.

OS (please complete the following information):

  • WSL2 on Windows 11

Cloud Provider (please complete the following information):

  • AWS

Additional context
Add any other context about the problem here.

Failed to parse /root/selfhost/inventory/forem/setup.yml with ini plugin

Hello,

I need some help with the error bellow.
I had no error till here following the installation instructions.

# ansible-playbook -i inventory/forem/setup.yml playbooks/providers/digitalocean.yml
[WARNING]:  * Failed to parse /root/selfhost/inventory/forem/setup.yml with ini plugin: Invalid host pattern
'---' supplied, '---' is normally a sign this is a YAML file.
[WARNING]:  * Failed to parse /root/selfhost/inventory/forem/setup.yml with yaml plugin: We were unable to read
either as JSON nor YAML, these are the errors we got from each: JSON: Expecting value: line 1 column 1 (char 0)
Syntax Error while loading YAML.   could not find expected ':'  The error appears to be in
'/root/selfhost/inventory/forem/setup.yml': line 85, column 11, but may be elsewhere in the file depending on
the exact syntax problem.  The offending line appears to be:            $ANSIBLE_VAULT;1.1;AES256
33363230656134663261373032636433383638363633383434626166333062326536373339376632           ^ here
[WARNING]: Unable to parse /root/selfhost/inventory/forem/setup.yml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not
match 'all'

PLAY [Deploy Forem to DigitalOcean] *****************************************************************************
skipping: no hosts matched

PLAY RECAP ******************************************************************************************************

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.