bugmark / exchange

Bugmark Exchange - Software Issue Marketplace
https://bugmark.github.io/website
Other
13 stars 9 forks source link

Create Documentation for setting up local environment #69

Closed simransinghal closed 6 years ago

simransinghal commented 6 years ago

It's easy for the newbies to start contributing to the project if we have good Readme including the steps of setting up the local environment of the project.

simransinghal commented 6 years ago

@andyl I want to work on this issue.

GeorgLink commented 6 years ago

Hi @simransinghal,

This is a great idea. We have a dated description (https://github.com/bugmark/bugmark/blob/master/notes/devenv.md). This could be a starting point for you to create detailed instructions that we can put on our README. If you run into issues, @andyl knows the answer to.

simransinghal commented 6 years ago

Hello @andyl @GeorgLink I send the pull request for this issue. Please give the suggestions on how I can improve it more.

snehasi commented 6 years ago

There is a Bugmark intern offer on this issue. My merged PR for this issue : https://github.com/bugmark/exchange/pull/73

GeorgLink commented 6 years ago

@snehasi if this issue is resolved, can you close it yourself?

GeorgLink commented 6 years ago

I will test the installation instructions later today and see if I can get them to work for a clean Ubuntu VM.

I will close the issue, if I was successful.

andyl commented 6 years ago

Mostly now we're cloning Linode VMs. Instant provisioning.

GeorgLink commented 6 years ago

I still want to go through and test the instructions on a local machine.

Installation instructions are important for onboarding new people. The installation is one of the first things newcomers may try and if it fails, they may not stick around.

GeorgLink commented 6 years ago

Error in step Development Environment Provisionsing - 4. Provision the dev machine. - See output in below image.

Error exists even on a second try.

image

GeorgLink commented 6 years ago

What is the output in step Development Environment Provisionsing - 5. Check database status supposed to be? not-found and inactive are intuitively not what I want - See output in below image.

image

GeorgLink commented 6 years ago

Error in step Application Bootstrap - 1. Install ruby gem. - See output in below image.

image

GeorgLink commented 6 years ago

I'm stopping the installation attempt, until we resolve the errors.

snehasi commented 6 years ago

Hi,

"Error in step Development Environment Provisionsing - 4. Provision the dev machine. - See output in below image." - This is due to your ansible configuration, I got the same error, as you can see below:

ansible_error3

This error can be resolved by updating your ansible config to the one specified in the requirements, after successful dev env config setup, you'd get an output like the one below: localhostyayya

snehasi commented 6 years ago

"What is the output in step Development Environment Provisionsing - 5. Check database status supposed to be? not-found and inactive are intuitively not what I want - See output in below image"

This is because your development environment provisioning isn't complete, you can check the database status and see active sessions after that only, which is the sixth step.

snehasi commented 6 years ago

Try sudo gem install bundler.

snehasi commented 6 years ago

You can find more about troubleshooting in my detailed notes here.

GeorgLink commented 6 years ago

Thanks @snehasi I can tell that you have some great knowledge of how Bugmark is setup.

Error in step Development Environment Provisionsing - 4. Provision the dev machine.

This error can be resolved by updating your ansible config to the one specified in the requirements, after successful dev env config setup, you'd get an output like the one below:

I followed the instructions step by step. What command exactly needs to be added to the instructions to update ansible config ? (I tried sudo apt-get update and sudo apt-get upgrade).

I like the idea of including 'check points' in the instructions. Checkpoints make sure that a step was completed successfully, such as checking that the ansible version is correct.

snehasi commented 6 years ago

From my notes: If you see the error fatal: [localhost]: FAILED! => {"changed": false, "failed": true,"msg": "Unsupported parameter for module: path"} It's probably because your ansible version isn't compatible, try upgrading your ansible version with:

Check the version: ansible --version

To upgrade your ansible version: sudo -H pip install --upgrade ansible

If this doesn't work, try removing all the previous versions and installing again with PPA:

compgen -c | grep ansible (should not return anything)
 sudo apt-add-repository ppa:ansible/ansible
 sudo apt-get update
 sudo apt-get install ansible
GeorgLink commented 6 years ago

Thanks @snehasi

The first option did not work (sudo -H pip install --upgrade ansible). image

When I run the fist line of the alternative, I do get a return, against your instructions: image

I'm following the instructions only, because I want to make sure that someone who does not have a background in all this can setup the dev environment.

What is the necessary step we need to add to the instructions, to make them work?

snehasi commented 6 years ago

@GeorgLink

As I said you have to remove the previous versions of ansible first, grep is just searching for ansible and should return nothing, as a check afterwards.

snehasi commented 6 years ago

pip is mostly failing build these days, that's why I have also specified how to install with ppa.

GeorgLink commented 6 years ago

Thanks @snehasi

As I said you have to remove the previous versions of ansible first, grep is just searching for ansible and should return nothing, as a check afterwards.

What is the command for that?

snehasi commented 6 years ago

sudo apt-get remove ansible

GeorgLink commented 6 years ago

Awesome. Thank you!

GeorgLink commented 6 years ago

@snehasi I appreciate your help through the install instructions.

Is it normal, that I get yelled at (all caps) that INFLUXDB NOT FOUND during step Application Bootstrap - Create databases ?

image

snehasi commented 6 years ago

No, that's not an error, InfluxDB is turned off for this repo, while setting up influuxDB for funderclone and intern exercises, we simply included it in the installation in ./util/code_util/cfg/_ansible/playbooks/bugmark.yml

GeorgLink commented 6 years ago

Awesome, thanks @snehasi

I think, the server is up and running 👍

Do you know how to make the server accessible for a Windows host? Neither of the IP addresses work.

image

GeorgLink commented 6 years ago

I solved it somehow :-)

Thanks a million @snehasi

GeorgLink commented 6 years ago

I will create a pull request with minor changes that I had to make to get it to work.

snehasi commented 6 years ago

You can check out this link, just in case: https://serverfault.com/questions/136715/how-do-i-access-a-web-server-on-a-virtualbox-from-the-host-machine Great!

GeorgLink commented 6 years ago

Thanks again @snehasi for all your help today.

Turns out that the installation notes were okay, it was an error in one of the scripts.

I created a pull request with the fix and minor changes to the devenv.md notes. #82

GeorgLink commented 6 years ago

This issue will be closed automatically, when pull request #82 is merged.

snehasi commented 6 years ago

Okay, this is great. Nice fix!

andyl commented 6 years ago

Have a look at #85 - I think we can create off-the-shelf server images with a CI/regression tests, and bypass the need for this complicated installation script.

GeorgLink commented 6 years ago

85 looks promising.