Berkshelf - Dependencies from another git repo - berksfile

I have a cookbook which has a dependency to one of the opsworks cookbooks (in the git repo) which in turn has many dependencies defined in the metadata which also resides in the same repo.I have added the dependency in my cookbook metadata file. But when I run berks install it's able to resolve the my dependent cookbook but not it's dependencies. Please help me in writing the Berksfile which will resolve all the dependencies.
Thanks

https://sethvargo.com/berksfile-magic/ this has the answer for the above question.

Related

What do these instructions when cloning a GitHub repo mean?

Here is a screenshot
For context, this a ReactJS project for a chrome extension for desktops. I'm just not entirely sure why I would have to change the name of these fields in the package.json.
The next instructions are to npm install the dependencies and then npm start the project and I understand those. It's the first two I don't understand.
I'm new to git cloning repositories so any help is appreciated. Thanks
The fields in package.json are just meta informations on your package.
If you would like to publish your project or even build it. The values from this file are used.

Correct approach for dependencies with npm when dealing with submodules

i have some questions and regarding the proper way to handle dependencies in nested projects, added via git submodules. lets assume this structure:
further assume in the top-level package.json dependencies need a react version > 16.7. In the submodule a strict version of 16.3.2 is needed.
when i now run npm install on the top-level, does npm install multiple versions of react? (don't see something like this in node_modules) but it seems to install modules declared only in submodules package.json. (how are they even found at compile time?)
There are certain warnings in the console however, that there might be multiple versions of react running...
What would be the best practice to handle such a situation?
Thanks in advance

Using Private Repo NPM Package as Dependency With Source Files Needing Compilation

Can't find a good answer anywhere. We have a private Github repo that is an Angular module and the source needs to be built (concat, minified, etc.) and put in a dist file when consumed or installed as a dependency.
Notes:
dist is ignored, so it never resides on Github (tried tracking this, too many conflicts with several developers)
we are currently using a post install hook to build the dependency package source (this does NOT seem like the right thing to do, also forces the project consuming the dependency package to have the necessary build dependencies)
Q What is the right way (or the common ways) to build a private repo npm package dependency, resulting in a dist folder with the proper built files?

Maven build on karaf - opendaylight

i am new to open daylight project.. i want to install open daylight controller and integrate my yang model with this .. so if i execute my POST query on controller it get responded.
i went through this tutorial
https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin::Running_controller_with_the_new_OF_plugin
to start karaf - but while building maven in the git clone ... cd
integration/distributions/extra/karaf mvn clean install.. step my
build is struck.. It remains in '[DEBUG] Using connector
WagonRepositoryConnector with priority 0 for
..nexus.opendaylight.org/content/repositories/public/ Downloading:
...nexus.opendaylight.org/content/repositories/public/com/h2database/h2/1.4.185/h2-1.4.185.jar'
and build get failed.
Please help me resolve this issue
I don't know if I have understood correctly your question, but you can clone opendaylight controller project repository from:
https://github.com/opendaylight/controller
Just try with:
git clone https://github.com/opendaylight/controller.git
and once it be downloaded, you can try to compile it executing:
mvn clean install
I will add controller to .m2 repository.
Anyway, if you want to add any controller feature into your project, you can add it into your features.xml file, as follows:
<repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
That will add mdsal feature to your project.
And modify features/pom.xml with the next dependency:
<dependency>
<groupId>org.opendaylight.controller</groupId>
<artifactId>mdsal-artifacts</artifactId>
<version>${mdsal.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
I hope that my info helps you. Let me know if you need more info.
Regards

Why is the node_modules folder not committed to Git?

When I create an AngularJS project with
yo angular
it creates a node_modules/ directory but puts that directory in .gitignore. When I clone the project elsewhere and run
grunt server
I get
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or
grunt hasn't been installed locally to your project. For more
information about installing and configuring grunt, please see the
Getting Started guide:
The getting started guide doesn't say anything about how to handle the missing node_modules/ directory however.
The node_modules/ directory is missing deliberately because yeoman put it in .gitignore.
What's the right way to use Yeoman and Grunt in this case?
Is there some better documentation for Yeoman and Grunt?
Thanks.
That is the correct behaviour. The contents of node_modules is not meant to be committed to source control. The idea behind npm is that it tracks all required node dependencies in a file called package.json. This file should be committed to source control. Then on a different machine, you can check out the code and run
npm install
This looks at the package.json file and downloads all required files from the cloud and puts them all into a new node_modules directory.
If you do enough searching on the topic you'll eventually run across the following article which states that if you're building an application that you should check-in your dependencies. Reliance on package.json can cause issues as module authors publish updates, a better solution is to use
npm shrinkwrap
which creates a file locking down your dependencies and your dependencies dependencies but even this can be brittle as it is possible for a module author to re-publish the same version with different code.
Since yo angular is creating an application IMHO node_modules should not be included in .gitignore, however as I just rudely discovered if you're on Windows there's a significant chance that you can't check-in the modules in that folder due to path lengths...sigh.

Resources