Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Conversation

@robertkowalski
Copy link
Member

this feature makes it easier to setup a cluster for browser
applications like fauxton as browsers follow the same-origin
policy. Before this PR you had to open the wizard in Fauxton on
all three nodes and enter your data there, which was quite
confusing and hard to explain. Now you can stay in the same tab
at the same address.

This PR enables three new params in the body:

remote_node:

ip of the remote node where we want to send the enable_cluster
request

remote_current_user:

the current admin username of the remote node

remote_current_password:

the current admin password of the remote node

To test, I run:

rm -rf dev/lib/ && ./dev/run --no-join --admin=a:b

and then run the test script:

./src/setup/t-frontend-setup.sh

COUCHDB-2598

src/setup.erl Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Options is a true {K,V} list, use lists:keyfind instead of proplists:is_defined. If you assume that Options may contain just remote_node with no associated value, then ignore this comment.

@kxepal
Copy link
Member

kxepal commented Jun 22, 2015

Wonder can we run these shell tests with make check...

@robertkowalski
Copy link
Member Author

@kxepal i fixed the usage of io:format for the whole component

@robertkowalski
Copy link
Member Author

Wonder can we run these shell tests with make check...

good question I also stumbled upon this. for now I just added another shell test to the ones that exist, we probably want to convert them to proper eunit tests in the future

@kxepal
Copy link
Member

kxepal commented Jun 23, 2015

@robertkowalski good idea!

src/setup.erl Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need in leading/trailing ~n when use couch_log as it already sets all new lines breaks right. That was reasonable for io:format/2, but only.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i did not know! thank you - fixed!

@robertkowalski
Copy link
Member Author

fixed!

@kxepal
Copy link
Member

kxepal commented Jun 23, 2015

@robertkowalski Looks good for me. Nice idea! (:

P.S. To run tests the right cmd is ./src/setup/test/t-frontend-setup.sh (;

@janl
Copy link
Member

janl commented Jun 24, 2015

+1 LGTM

my build/ branch on couchdb.git introduces a few .sh scripts to test the build system itself in /test/build/ and I’d like to hook them into make check as well, I think we can just run them outside of eunit.

robertkowalski and others added 3 commits June 24, 2015 15:35
this feature makes it easier to setup a cluster for browser
applications like fauxton as browsers follow the same-origin
policy. Before this PR you had to open the wizard in Fauxton on
all three nodes and enter your data there, which was quite
confusing and hard to explain. Now you can stay in the same tab
at the same address.

This PR enables three new params in the body:

`remote_node`:

ip of the remote node where we want to send the `enable_cluster`
request

`remote_current_user`:

the current admin username of the remote node

`remote_current_password`:

the current admin password of the remote node

To test, I run:

```
rm -rf dev/lib/ && ./dev/run --no-join --admin=a:b
```

and then run the test script:

```
./src/setup/test/t-frontend-setup.sh
```

COUCHDB-2598
@robertkowalski robertkowalski force-pushed the 2598-wizard-fauxton-same-origin branch from ebcf429 to 62c852a Compare June 24, 2015 13:35
asfgit pushed a commit that referenced this pull request Jun 24, 2015
this feature makes it easier to setup a cluster for browser
applications like fauxton as browsers follow the same-origin
policy. Before this PR you had to open the wizard in Fauxton on
all three nodes and enter your data there, which was quite
confusing and hard to explain. Now you can stay in the same tab
at the same address.

This PR enables three new params in the body:

`remote_node`:

ip of the remote node where we want to send the `enable_cluster`
request

`remote_current_user`:

the current admin username of the remote node

`remote_current_password`:

the current admin password of the remote node

To test, I run:

```
rm -rf dev/lib/ && ./dev/run --no-join --admin=a:b
```

and then run the test script:

```
./src/setup/test/t-frontend-setup.sh
```

COUCHDB-2598

PR: #2
PR-URL: #2
Reviewed-By: Jan Lehnardt <[email protected]>
Reviewed-By: Alexander Shorin <[email protected]>
asfgit pushed a commit that referenced this pull request Jun 24, 2015
PR: #2
PR-URL: #2
Reviewed-By: Jan Lehnardt <[email protected]>
Reviewed-By: Alexander Shorin <[email protected]>
asfgit pushed a commit that referenced this pull request Jun 24, 2015
PR: #2
PR-URL: #2
Reviewed-By: Jan Lehnardt <[email protected]>
Reviewed-By: Alexander Shorin <[email protected]>
@robertkowalski
Copy link
Member Author

merged as:

aa17a55
f4fd3fa
616789b

thank you! :)

@robertkowalski robertkowalski deleted the 2598-wizard-fauxton-same-origin branch June 24, 2015 13:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants