Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup asdf and direnv managed development environment #44

Merged
merged 13 commits into from
Nov 22, 2023

Conversation

iilyak
Copy link
Contributor

@iilyak iilyak commented Nov 5, 2021

Now cd into the project directory would activate correct versions of build
dependencies.

Sorry for cleaning up the trailing spaces in README.md. My editor does that by default.

@iilyak iilyak force-pushed the add-asdf-managed-tooling branch from dbd29a0 to 64eae51 Compare November 5, 2021 14:50
@tonysun83
Copy link
Contributor

Seems test cases are having issues connecting with clouseau during mvn test phase:

java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:741)
	at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:401)
	at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:370)
	at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:292)
	at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
	at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
	at overlock.threadpool.ErrorLoggedThread.run(NamedThreadFactory.scala:40)

Copy link
Contributor

@jaydoane jaydoane left a comment

Choose a reason for hiding this comment

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

I would like to see this land. Do you have any desire to rebase and update?

.envrc Outdated
@@ -0,0 +1,3 @@
use asdf
watch_file ".asdf"
dotenv_if_exists .envrc.local
Copy link
Contributor

Choose a reason for hiding this comment

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

At one point, I had to add this get clouseau working:

export MAVEN_OPTS=-Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2

Do you not find that necessary? If so, is this the file to include it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not needed. The maven central no longer supports TLSv1x so this workaround no longer works.

https://central.sonatype.org/faq/tls-info/

This was needed to convince maven to use old version of TLS because old java versions didn't have support for modern TLS versions in their http client library. The zulu distribution used in this setup backported modern TLS support to java 7.48 (used here).

Makefile Outdated
.PHONY: clouseau1
# target: clouseau1 - Start local inistance of clouseau1 node
clouseau1: .asdf
@mvn scala:run -Dlauncher=$@
Copy link
Contributor

Choose a reason for hiding this comment

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

Has this recently changed to require explicitly setting the Erlang distribution cookie?

Copy link
Contributor

Choose a reason for hiding this comment

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

The Erlang cookie is now optional for Clouseau. It is the launcher interface that has changed. It should say something like: mvn scala:run -Dname=clouseau1.

Copy link
Contributor

Choose a reason for hiding this comment

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

However, I think it could be beneficial to let the user to set the cookie still if that is needed (for example, CouchDB uses its own cookie and the default from ~/.erlang.cookie). This can be done by using the with-cookie launcher.

mvn scala:run -Dlauncher=with-cookie  -Dname=clouseau1 -Dcookie=brumbrum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cookie support is implemented in 8099855

@iilyak iilyak force-pushed the add-asdf-managed-tooling branch from c99e60e to 0963ee0 Compare November 20, 2023 19:40
## Configuration options
This guide explains the various clouseau configuration options available, and how to use them to tune clouseau performance and scalability. There are two categories of clouseau options, first category is about tuning the JVM (ex: Xmx) and other category of options that go into clouseau.ini.
This guide explains the various clouseau configuration options available, and how to use them to tune clouseau performance and scalability. There are two categories of clouseau options, first category is about tuning the JVM (ex: Xmx) and other category of options that go into clouseau.ini.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am sorry my editor removes trailing spaces. I can "fix it" if it is an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good thing, I do not think we should worry about that.

Copy link
Contributor

@jaydoane jaydoane left a comment

Choose a reason for hiding this comment

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

Tested make targets:

  • clean
  • build
  • clouseau1

and all work as expected. Nicely done!

One small issue, during make build it logs this line:

[INFO] Dependency-reduced POM written at: /Users/jay/repos/clouseau/dependency-reduced-pom.xml

Should dependency-reduced-pom.xml be added to .gitignore?

@iilyak
Copy link
Contributor Author

iilyak commented Nov 21, 2023

@pgj Would it negatively impact your work on CI if I merge it?

.tool-versions Show resolved Hide resolved
Makefile Outdated


define CONTRIBUTE_SHELL_SETUP
We detected $(CURRENT_SHELL) running on $(CURRENT_OS). Unfortunatelly
Copy link
Contributor

Choose a reason for hiding this comment

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

s/Unfortunatelly/Unfortunately/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 42827b4

Makefile Outdated Show resolved Hide resolved
@@ -0,0 +1,290 @@
.PHONY: help
# target: help - Print this help
Copy link
Contributor

Choose a reason for hiding this comment

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

That is nice, I am glad you made available it here too.

README.md Show resolved Hide resolved
@pgj
Copy link
Contributor

pgj commented Nov 21, 2023

@pgj Would it negatively impact your work on CI if I merge it?

No, I do not think so.

Running Clouseau in the CouchDB CI (and the respective developer setup) is supported through the releases section of this repository, i.e. downloading and unpacking pre-built JARs. It does not have to deal with the compilation. This makes launching the Clouseau nodes faster, can work with JRE 8, depends on the JRE itself, in exchange for not being able to serve development versions from the source locally. For that, one has to launch Clouseau as suggested in this PR for example, and separately run CouchDB configured for looking for clouseauN.

@iilyak iilyak merged commit af7e555 into master Nov 22, 2023
1 check passed
@iilyak iilyak deleted the add-asdf-managed-tooling branch November 22, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants