now creating a valid config with ssl certificates
This commit is contained in:
parent
92307b187d
commit
2caa3c3d1a
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ node_modules/
|
||||
nginxconfig/zones/
|
||||
coverage/
|
||||
docs/
|
||||
.nogit/
|
2
dist/smartnginx.classes.nginxconfig.d.ts
vendored
2
dist/smartnginx.classes.nginxconfig.d.ts
vendored
@ -5,7 +5,7 @@ export declare class NginxConfig {
|
||||
zones: NginxZone[];
|
||||
cert: plugins.cert.Cert;
|
||||
isDeployed: boolean;
|
||||
constructor(optionsArg: plugins.cert.CertConstructorOptions);
|
||||
constructor(optionsArg: plugins.cert.ICertConstructorOptions);
|
||||
addZone(zoneArg: NginxZone): void;
|
||||
listZones(): NginxZone[];
|
||||
removeZones(zoneArg: NginxZone): void;
|
||||
|
7
dist/smartnginx.classes.nginxconfig.js
vendored
7
dist/smartnginx.classes.nginxconfig.js
vendored
@ -11,8 +11,9 @@ var NginxConfig = (function () {
|
||||
this.cert = new plugins.cert.Cert({
|
||||
cfEmail: optionsArg.cfEmail,
|
||||
cfKey: optionsArg.cfKey,
|
||||
sslDir: optionsArg.sslDir,
|
||||
gitOriginRepo: optionsArg.gitOriginRepo
|
||||
sslDir: paths.nginxCertBase,
|
||||
gitOriginRepo: optionsArg.gitOriginRepo,
|
||||
testMode: optionsArg.testMode
|
||||
});
|
||||
}
|
||||
;
|
||||
@ -66,4 +67,4 @@ var NginxConfig = (function () {
|
||||
}());
|
||||
exports.NginxConfig = NginxConfig;
|
||||
;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRuZ2lueC5jbGFzc2VzLm5naW54Y29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRuZ2lueC5jbGFzc2VzLm5naW54Y29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxJQUFZLE9BQU8sV0FBTS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SxDQUFDLENBQUEsQ0FBQztnQkFDaEIsT0FBTyxDQUFDLE9BQU8sQ0FBQyxLQUFJLENBQUMsQ0FBQztZQUMxQixDQUFDO1lBQUEsQ0FBQztZQUNGLElBQUksQ0FBQyxPQUFPLEVBQUUsQ0FBQztRQUNuQixDQUFDLENBQUMsQ0FBQztRQUVQLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDO0lBQ3hCLENBQUM7O0lBQ0wsa0JBQUM7QUFBRCxDQUFDLEFBekRELElBeURDO0FBekRZLG1CQUFXLGNBeUR2QixDQUFBO0FBQUEsQ0FBQyJ9
|
1
nginxconfig/cert/test100.bleu.de/config.json
Normal file
1
nginxconfig/cert/test100.bleu.de/config.json
Normal file
@ -0,0 +1 @@
|
||||
{"domainName":"test100.bleu.de","created":1468407737,"expires":1476183737}
|
61
nginxconfig/cert/test100.bleu.de/fullchain.pem
Normal file
61
nginxconfig/cert/test100.bleu.de/fullchain.pem
Normal file
@ -0,0 +1,61 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF4zCCBMugAwIBAgITAPr5NPJaC4P8Afv5wUHV0taFDDANBgkqhkiG9w0BAQsF
|
||||
ADAiMSAwHgYDVQQDDBdGYWtlIExFIEludGVybWVkaWF0ZSBYMTAeFw0xNjA3MTMx
|
||||
MDAzMDBaFw0xNjEwMTExMDAzMDBaMBoxGDAWBgNVBAMTD3Rlc3QxMDAuYmxldS5k
|
||||
ZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBALWwQO+WIZZgEoGXfFVb
|
||||
3sB5iIro4xtHHxYLr5l0i9YfxJFA0mltgez7IHPIE0CWbdxme+rFUdbG+s4bpe3b
|
||||
g3IYtiSJ7HIMSpgkj66ow4ZVbs5jJ3VeykZsBcXDNqy5conFuwI326BZeDKfmm2g
|
||||
UxY7Pm2jJOat7ERUpone6Y7UO7TRa5INmUPZzOB9FzAx3YSFSbUbXzpZFkTJrX+u
|
||||
gVtgkEU4h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QXWGohnJ8iBm+5nk7O2ynaPVW0U2W+pt2w
|
||||
SVuvdDM5zGv2f9ltNWUiYZHJ1mmO97jSY/6YfdOUH66iRtQtDkHBRdkNBsMbD+Em
|
||||
2TgBldtHNSJBfB3pm9FblgOcJ0FSWcUDWJ7vO0+NTXlgrRofRT6pVywzxVo6dND0
|
||||
WzYlTWeUVsO40xJqhgUQRER9YLOLxJ0O6C8i0xFxAMKOtSdodMB3RIwt7RFQ0uyt
|
||||
n5Z5MqkYhlMI3J1tPRTp1nEt9fyGspBOO05gi148Qasp+3N+svqKomoQglNoAxU=
|
||||
-----END CERTIFICATE-----
|
51
nginxconfig/cert/test100.bleu.de/privkey.pem
Normal file
51
nginxconfig/cert/test100.bleu.de/privkey.pem
Normal file
@ -0,0 +1,51 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIJKgIBAAKCAgEAtbBA75YhlmASgZd8VVvewHmIiujjG0cfFguvmXSL1h/EkUDS
|
||||
aW2B7Psgc8gTQJZt3GZ76sVR1sb6zhul7duDchi2JInscgxKmCSPrqjDhlVuzmMn
|
||||
dV7KRmwFxcM2rLlyicW7AjfboFl4Mp+abaBTFjs+baMk5q3sRFSmid7pjtQ7tNFr
|
||||
kg2ZQ9nM4H0XMDHdhIVJtRtfOlkWRMmtf66BW2CQRTiGPnU0cZLX4CS8mtVsfky1
|
||||
mJfEktNiu7yjoninAZU6CS78ZBw3u59/ZeKxtX2BZsV1CNQtbVgxgsOGTkOY39a6
|
||||
Gh2gkd2eO2W/1bAnWA4ezG7c1UpiyENkkdWv8LASKt2D2Z9/GIYeSGet82dfEdv0
|
||||
3KAPR1eL/6XLxGxUHBMFXjfvzbETiFVlc6oPTbbmFTphwJ8Fv2q/xgbe+Mhuc3JO
|
||||
MmNLYXlRFfVHCEFMqY5nV7xany5//K53YfvJ3+Pe8xBbaM20IvOy3DwlarpLuFaz
|
||||
We8ZkCnsKTnFeetmcpPixCJaVjfk9R++J763MgCaZIfGv7fy8q4Pp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Vul96lEPOh5R+Dgz/bL5h8SFfI
|
||||
Hl6/RQ/DwFfJZopyISNED8MJ1kchWBc3wUxgFwshKvq45GkJL7sMw12Mz5yEFolu
|
||||
oxWS4qwa0GZZ8Z+kAg+unMYXUbK/COLZZjpAvPRfD+7C3KEEXlivJuWkVm+nO43A
|
||||
fVeMLWmH5Qqtr4szwtVZh6yilkZnC7OwCsOIrXE8HlXvx3/mUJoDS3Dgd8FJ14ec
|
||||
U0rwy860wsKQvsZSp7t9RqDbJH5a7dyWyQKCAQEA0Vxuf49w8nWjTc0J4CSL21Mv
|
||||
fDV/XSwwqI1+MfgZBSUyaRHXeNhR4dGX7bzMgyIW5s++5GaiDpJG4xxof1c5pgLq
|
||||
bnQ5Go/sk/x5hqXAEY1GuXa9s0efYSvqKIe3pLPiv4CH/Cz3POS2w0W0ctewcSSA
|
||||
eaT3VmVwFTjQPqnkpe29tI5GNcDBypNm5PimvlR3swYcYsHU98OvLtCirpINd42C
|
||||
W/FwxJSaVo1Tf/JOwJO+0vyw6L7/hiOVNwef8Hoj/I2BU9IA2uWUv4t//hPTmLwE
|
||||
LPCIZOHaWN5/Kpyi6+bNJeaLXdRC3iwGElsKWvDcbea1lt3Zg8V8t0x2VAfekA==
|
||||
-----END RSA PRIVATE KEY-----
|
@ -24,7 +24,7 @@
|
||||
"dependencies": {
|
||||
"@types/q": "*",
|
||||
"beautylog": "^5.0.13",
|
||||
"cert": "0.0.15",
|
||||
"cert": "0.0.16",
|
||||
"q": "^1.4.1",
|
||||
"shelljs": "^0.7.0",
|
||||
"smartfile": "^4.0.10",
|
||||
@ -32,6 +32,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"npmts-g": "^5.2.6",
|
||||
"qenv": "^1.0.8",
|
||||
"should": "^9.0.2",
|
||||
"typings-test": "^1.0.1"
|
||||
}
|
||||
|
24
test/test.js
24
test/test.js
@ -1,7 +1,13 @@
|
||||
"use strict";
|
||||
require("typings-test");
|
||||
var path = require("path");
|
||||
require("should");
|
||||
var qenv_1 = require("qenv");
|
||||
var smartnginx = require("../dist/index");
|
||||
// setup environment
|
||||
var testQenv = new qenv_1.Qenv(process.cwd(), path.join(process.cwd(), ".nogit"));
|
||||
console.log(process.env.CF_EMAIL);
|
||||
console.log(process.env.CF_KEY);
|
||||
describe("smartnginx", function () {
|
||||
var testNginxConfig;
|
||||
var testNginxZone01;
|
||||
@ -9,7 +15,7 @@ describe("smartnginx", function () {
|
||||
describe("NginxZone", function () {
|
||||
it("\"new NginxZone()\" should produce an instance of NginxConfig", function () {
|
||||
testNginxZone01 = new smartnginx.NginxZone({
|
||||
zoneName: "test1.bleu.de",
|
||||
zoneName: "test100.bleu.de",
|
||||
type: smartnginx.zoneTypes.reverseProxy,
|
||||
destination: "192.192.192.192"
|
||||
});
|
||||
@ -19,7 +25,11 @@ describe("smartnginx", function () {
|
||||
});
|
||||
describe("NginxConfig", function () {
|
||||
it("\"new NginxConfig()\" should produce an instance of NginxConfig", function () {
|
||||
testNginxConfig = new smartnginx.NginxConfig();
|
||||
testNginxConfig = new smartnginx.NginxConfig({
|
||||
cfEmail: process.env.CF_EMAIL,
|
||||
cfKey: process.env.CF_KEY,
|
||||
testMode: true
|
||||
});
|
||||
testNginxConfig.should.be.instanceof(smartnginx.NginxConfig);
|
||||
});
|
||||
describe(".addZone()", function () {
|
||||
@ -28,10 +38,14 @@ describe("smartnginx", function () {
|
||||
});
|
||||
});
|
||||
describe(".deploy()", function () {
|
||||
it("should deploy a config from an instance", function () {
|
||||
testNginxConfig.deploy();
|
||||
this.timeout(240000);
|
||||
it("should deploy a config from an instance", function (done) {
|
||||
testNginxConfig.deploy()
|
||||
.then(function () {
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLC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SCxRQUFRLENBQUMsWUFBWSxFQUFDO1lBQ2xCLEVBQUUsQ0FBQyx5Q0FBeUMsRUFBQztnQkFDekMsZUFBZSxDQUFDLE9BQU8sQ0FBQyxlQUFlLENBQUMsQ0FBQztZQUM3QyxDQUFDLENBQUMsQ0FBQTtRQUNOLENBQUMsQ0FBQyxDQUFDO1FBQ0gsUUFBUSxDQUFDLFdBQVcsRUFBQztZQUNqQixJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFDO1lBQ3JCLEVBQUUsQ0FBQyx5Q0FBeUMsRUFBQyxVQUFTLElBQUk7Z0JBQ3RELGVBQWUsQ0FBQyxNQUFNLEVBQUU7cUJBQ25CLElBQUksQ0FBQztvQkFDRixJQUFJLEVBQUUsQ0FBQztnQkFDWCxDQUFDLENBQUMsQ0FBQztZQUNYLENBQUMsQ0FBQyxDQUFBO1FBQ04sQ0FBQyxDQUFDLENBQUM7SUFDUCxDQUFDLENBQUMsQ0FBQztBQUNQLENBQUMsQ0FBQyxDQUFDIn0=
|
22
test/test.ts
22
test/test.ts
@ -1,7 +1,13 @@
|
||||
import "typings-test";
|
||||
import path = require("path");
|
||||
import "should";
|
||||
import {Qenv} from "qenv";
|
||||
import * as smartnginx from "../dist/index";
|
||||
|
||||
// setup environment
|
||||
let testQenv = new Qenv(process.cwd(),path.join(process.cwd(),".nogit"));
|
||||
console.log(process.env.CF_EMAIL);
|
||||
console.log(process.env.CF_KEY);
|
||||
describe("smartnginx",function(){
|
||||
let testNginxConfig:smartnginx.NginxConfig;
|
||||
let testNginxZone01:smartnginx.NginxZone;
|
||||
@ -9,7 +15,7 @@ describe("smartnginx",function(){
|
||||
describe("NginxZone",function(){
|
||||
it(`"new NginxZone()" should produce an instance of NginxConfig`,function(){
|
||||
testNginxZone01 = new smartnginx.NginxZone({
|
||||
zoneName:"test1.bleu.de",
|
||||
zoneName:"test100.bleu.de",
|
||||
type:smartnginx.zoneTypes.reverseProxy,
|
||||
destination:"192.192.192.192"
|
||||
});
|
||||
@ -19,7 +25,11 @@ describe("smartnginx",function(){
|
||||
});
|
||||
describe("NginxConfig",function(){
|
||||
it(`"new NginxConfig()" should produce an instance of NginxConfig`,function(){
|
||||
testNginxConfig = new smartnginx.NginxConfig();
|
||||
testNginxConfig = new smartnginx.NginxConfig({
|
||||
cfEmail: process.env.CF_EMAIL,
|
||||
cfKey: process.env.CF_KEY,
|
||||
testMode:true
|
||||
});
|
||||
testNginxConfig.should.be.instanceof(smartnginx.NginxConfig);
|
||||
});
|
||||
describe(".addZone()",function(){
|
||||
@ -28,8 +38,12 @@ describe("smartnginx",function(){
|
||||
})
|
||||
});
|
||||
describe(".deploy()",function(){
|
||||
it("should deploy a config from an instance",function(){
|
||||
testNginxConfig.deploy();
|
||||
this.timeout(240000);
|
||||
it("should deploy a config from an instance",function(done){
|
||||
testNginxConfig.deploy()
|
||||
.then(() => {
|
||||
done();
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
|
@ -9,12 +9,13 @@ export class NginxConfig {
|
||||
zones:NginxZone[] = [];
|
||||
cert:plugins.cert.Cert; // the Cert Instance from which the config gets its certificates
|
||||
isDeployed:boolean = false;
|
||||
constructor(optionsArg:plugins.cert.CertConstructorOptions){
|
||||
constructor(optionsArg:plugins.cert.ICertConstructorOptions){
|
||||
this.cert = new plugins.cert.Cert({
|
||||
cfEmail:optionsArg.cfEmail,
|
||||
cfKey:optionsArg.cfKey,
|
||||
sslDir:optionsArg.sslDir,
|
||||
gitOriginRepo:optionsArg.gitOriginRepo
|
||||
sslDir:paths.nginxCertBase,
|
||||
gitOriginRepo:optionsArg.gitOriginRepo,
|
||||
testMode:optionsArg.testMode
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user