The java -jar corda.jar command picks up cordapps from $basedir/cordapps by default. Is there an option to specify an alternatively cordapps directory? This may be useful when multiple nodes are sharing the same set of cordapps.
It's not possible to override only cordapp path. You can override the workspace directory and other fields in the node.conf (documentation).
An option could be to mount a folder in each node from a shared filesystem (e.g. EFS on AWS) where you store the cordapps.
Related
I am trying to create a bootstrap test network on aws, and I am using this -
java -jar corda-tools-network-bootstrapper-4.5.jar --dir ./
I get -
Bootstrapping local test network in /home/ubuntu No nodes found
The jar seems to be correct. The docs state - https://docs.corda.net/docs/corda-os/4.5/network-bootstrapper.html -
java -jar network-bootstrapper-4.5.jar --dir <nodes-root-dir>
I cannot find network-bootstrapper-4.5.jar but only the corda-tools-network-bootstrapper-4.5.jar. The error seems to be something related to the node.conf file.
Has anyone any ideas?
If you follow the steps that are mentioned here, you will see that it says:
Create a directory containing a node config file...for each node
The keywords are node config file; so you must do the following:
Build your nodes: From the root folder of your project run ./gradlew deployNodes; this will create a folder for every node that you defined inside the deployNodes Gradle task of your root build.gradle file.
The folders will be inside path-to-project-folder/build/nodes. If you inspect the folders, you'll see that each node has a node.conf file which the documentation of the bootstrapper is talking about.
Run the bootstrapper command where the <nodes-root-dir> is path-to-project-folder/build/nodes since it contains all of your nodes.
I need to check if a directory is mounted or not. I have checked on doc.ansible for help but they only have create or delete.
I am using visual code for ansible and vm for directory file.
Module setup returns a list of mounted filesystems "ansible_mounts". It is possible to test it
ansible remote-host -m setup
I'm working on an SBT project that has to be built with the options like:
-Xmx2G -Xss256M -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
This means that every new developer has to read the readme and assign the options to SBT_OPTS in bash profile or put them in the sbtopts file. Similarly, this has to be configured on Jenkins and this applies to all the projects (so if someone wants to use -XX:+UseG1GC with other projects it becomes an issue). Is it possible to specify the required options in the build file itself? This seems logical to me, as the options are project-specific and without them, you cannot build the project.
Create a .sbtopts file at the root of the build with contents:
-J-Xmx2G
-J-Xss256M
-J-XX:+UseConcMarkSweepGC
-J-XX:+CMSClassUnloadingEnabled
I've setup a 4 node corda network with Notary, NodeA, NodeB and NodeC. When I bring up node and webserver instances for individual nodes, network comes up healthy. But,
1) I want to keep the configs under /etc/node.conf and runtime environment under /opt/corda directories for each of the nodes. When I provide --config-file and --base-directory arguments, per documentation, corda refuses to run with both arguments as inputs. Is there a way to isolate runtime environments and configs?
2) How do I make the nodes pick up the jars under plugins ? I've created a plugins directory for each of these nodes under basedirectory path - /opt/corda/plugins. But, created it's own plugins directory. (Albeit, in my current setup I have a node.conf file under /opt/corda/ to keep it going). Where must I deploy my cordapps if corda is not picking up from the plugins folder I've created? Am I missing something here ? I've followed the docs during my setup.
1) As you observed, using the --config-file and --base-directory command line arguments together is currently disallowed.
However, you can store your node.conf file in a separate location by creating a symlink in the root of the node folder that points to the actual location of the node.conf file (e.g. ln -s ./conf/node.conf ./node.conf on Mac if you are storing the node.conf file in a conf folder in the node's root directory).
2) Awaiting clarification.
I'm writing an oozie java action which has my custom code in a jar file in the job ./lib folder.
I would also like to add to the classpath a jar in a folder external to my job (i.e. /home/me/otherjars/spark-assembly.jar).
The ./lib folder gets added to the classpath automatically. How can I get oozie to also add the external jar?
The oozie.libpath property is definitely what you need. Please check...
the Oozie documentation
this Oozie JIRA about global/local scope for that property
this orphan thread about precedence order (search for that
phrase)
this post and this other post, for example
The Bestway to use any custom Jars in Oozie useing, Once Oozie Sharedlib Installed in Cluster, you can mention place the Jar, in Sub Folder and pass the parameter
oozie.use.system.libpath = true
These will call Jar when every the Jobs are getting started.
Another option you can use, is adding Custom Path with UDF jar in hadoop_env.sh file under Hadoop ClassPath, These required your Hadoop restart to take effect, along with it also required you Custom JAR Path should be available in all the Nodes of Hadoop Cluster.