sgentle / chef-node Goto Github PK
View Code? Open in Web Editor NEWChef API client for nodejs
Chef API client for nodejs
Is it possible to run chef client from node.js application.
I'm trying to get this module up and running, and it works great for fetching data, however when I try and push data, I get the following error.
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty/1.7.10.1</center>
</body>
</html>
Here is my index.js
var express = require('express');
var router = express.Router();
router.post('/foobar', function(req,res) {
var client = req.client;
client.get('/nodes/foo',function(err,res,body){
body.run_list.push('role[fooy]');
client.post('/nodes/foo',body,function(err,res,body){
console.log(err ? err : body);
});
});
});
Does this module natively follow 301 redirects? I've been trying to use this workaround with no luck.
http://stackoverflow.com/a/13390241/1626687
Are there any other examples out there that show the proper way to post data?
Express 4
Node 0.12.4
OSX
I think in function Chef
must be not required parameter(hash) in which we can put options like:
As pointed out in #10 support of ursa
is currently up in the air, but there is talk about it changing hands and getting updated. We should check into it's status once 0.12 lands to see if it makes sense to continue using it.
If that doesn't pan out, we can port the small portion of native code we care about directly into chef-node.
ursa
has been resumedursa
still looks pretty deadsetPrivateKeyPem
and privateEncrypt
native methodsWhich api can be used to communicate between node.js application and chef server to create the databag item through api and then run chef client via node.js application.
I want to create a chef vault item using the chef api from my node.js application. is there any api to do so.?
Hi @sgentle,
I'am really interested into using your node REST handler module for the Chef REST API !
But before I would want to know some details about the state of the module:
Thanks for your great work and by advance, thanks for your additional informations.
Rémi Becheras.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.