-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
3,714 additions
and
1,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
|
||
## [0.7.0](https://github.com/ottomatica/Baker/compare/v0.6.15...v0.7.0) (2019-05-05) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* Upgrade node-virtualbox to add VirtBox 6 support ([ottomatica/node-virtualbox#27](https://github.com/ottomatica/node-virtualbox/pull/27)) ([faeb715](https://github.com/ottomatica/node-virtualbox/commit/faeb715f7a59b831511bedacb329f5c86d818d00)), closes [#119](https://github.com/ottomatica/Baker/issues/119) | ||
* Fixed invalid imports ([#91](https://github.com/ottomatica/Baker/issues/91)) ([ebda70c](https://github.com/ottomatica/Baker/commit/ebda70c)), closes [#90](https://github.com/ottomatica/Baker/issues/90) | ||
* Update node-virtualbox to enable symlinks in shared folder ([85fa44b](https://github.com/ottomatica/Baker/commit/85fa44b)) | ||
* Update validator logic to not need drivelist dependency ([8af6f89](https://github.com/ottomatica/Baker/commit/8af6f89)) | ||
|
||
|
||
### Features | ||
|
||
* Better error message + suggestion for invalid Bakelet names ([145ece9](https://github.com/ottomatica/Baker/commit/145ece9)), closes [#101](https://github.com/ottomatica/Baker/issues/101) | ||
* Arch Linux PKGBUILD ([#120](https://github.com/ottomatica/Baker/pull/120)) ([59f5e81](https://github.com/ottomatica/Baker/commit/59f5e81)), closes [#115](https://github.com/ottomatica/Baker/issues/115) | ||
|
||
|
||
<a name="0.6.15"></a> | ||
## 0.6.15 (2018-11-26) | ||
|
||
### Features | ||
|
||
* Add python3.6 Bakelet ([2e52f01](https://github.com/ottomatica/Baker/commit/2e52f01)) | ||
|
||
<a name="0.6.14"></a> | ||
## 0.6.14 (2018-11-25) | ||
|
||
### Bug Fixes | ||
|
||
* **bakelets:** Fix R Bakelet to work when no packages are provided ([b07c20e](https://github.com/ottomatica/Baker/commit/b07c20e)), closes [#69](https://github.com/ottomatica/Baker/issues/69) | ||
* **providers:** Virtualbox stop command now stops instead of save state ([edde1a6](https://github.com/ottomatica/Baker/commit/edde1a6)) | ||
|
||
### Features | ||
|
||
* Introducing _Vault_ ([235f144](https://github.com/ottomatica/Baker/commit/235f144)) | ||
* Add python3.6 Bakelet ([2e52f01](https://github.com/ottomatica/Baker/commit/2e52f01)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Maintainer: Samim Mirhosseini <samim@ottomatica.io> | ||
pkgname="baker" | ||
pkgver=0.7.0 | ||
pkgrel=1 | ||
pkgdesc="Quick and easy baking of computing environments." | ||
arch=('x86_64') | ||
url="https://github.com/ottomatica/Baker" | ||
license=('Apache') | ||
provides=('baker') | ||
makedepends=('npm' 'jq' 'python2') | ||
optdepends=('virtualbox: virtual machine support') | ||
source=($pkgname-$pkgver.tar.gz::https://github.com/ottomatica/Baker/archive/v$pkgver.tar.gz) | ||
md5sums=('63a02cc6837a64b917558c763dff1341') | ||
|
||
package() { | ||
npm install -g \ | ||
--user root \ | ||
--prefix "$pkgdir"/usr \ | ||
--cache "${srcdir}/npm-cache" \ | ||
"$srcdir"/$pkgname-$pkgver.tar.gz | ||
|
||
# Non-deterministic race in npm gives 777 permissions to random directories. | ||
# See https://github.com/npm/npm/issues/9359 for details. | ||
find "${pkgdir}"/usr -type d -exec chmod 755 {} + | ||
|
||
# Remove dependency references to $pkgdir | ||
find "$pkgdir" -name package.json -print0 | xargs -0 sed -i '/_where/d' | ||
|
||
# Remove package references to $pkgdir | ||
local tmppackage="$(mktemp)" | ||
local pkgjson="$pkgdir/usr/lib/node_modules/$pkgname/package.json" | ||
jq '.|=with_entries(select(.key|test("_.+")|not))' "$pkgjson" > "$tmppackage" | ||
mv "$tmppackage" "$pkgjson" | ||
chmod 644 "$pkgjson" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: Baker | ||
Version: 0.6.13 | ||
Version: 0.7.0 | ||
Section: base | ||
Priority: optional | ||
Architecture: amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
const Bakelet = require('../bakelet'); | ||
const path = require('path'); | ||
|
||
const { privateKey } = require('../../../global-vars'); | ||
const conf = require('../../modules/configstore') | ||
|
||
const Ansible = require('../../modules/configuration/ansible'); | ||
const VaultLib = require('../../modules/vault'); | ||
const Ssh = require('../../modules/ssh'); | ||
|
||
class Vault extends Bakelet { | ||
|
||
constructor(name,ansibleSSHConfig, version) { | ||
super(ansibleSSHConfig); | ||
|
||
this.name = name; | ||
this.version = version; | ||
} | ||
|
||
|
||
async load(obj, variables) | ||
{ | ||
|
||
let passphraseKey = `vault:${this.bakePath}`; | ||
let passphrase = ''; | ||
if (conf.has(passphraseKey)) | ||
{ | ||
passphrase = conf.get(passphraseKey); | ||
} | ||
else | ||
{ | ||
// should be set in baking process. | ||
throw new Error("Vault pass has not been correctly set.") | ||
} | ||
let vault = new VaultLib(); | ||
|
||
if( Array.isArray(obj.vault) ) | ||
{ | ||
this.vault = obj.vault; | ||
this.variables = variables || {}; | ||
|
||
for (let entry of obj.vault) | ||
{ | ||
let file = path.join(this.bakePath, entry.file); | ||
let content = vault.retrieve(file, passphrase); | ||
|
||
await Ssh.writeContentToDest(content, | ||
`/home/vagrant/baker/${this.name}/templates/${entry.file}`, | ||
this.ansibleSSHConfig, | ||
false | ||
); | ||
} | ||
} | ||
} | ||
|
||
async install() | ||
{ | ||
if( this.vault ) | ||
{ | ||
for (let entry of this.vault) | ||
{ | ||
await Ansible.createDirectory({name: this.name}, path.dirname(entry.dest), "0755", this.ansibleSSHConfig, this.verbose ); | ||
|
||
await Ansible.runAnsibleTemplateCmd( | ||
{name: this.name}, `/home/vagrant/baker/${this.name}/templates/${entry.file}`, | ||
entry.dest, this.variables, this.ansibleSSHConfig, this.verbose); | ||
} | ||
} | ||
} | ||
|
||
|
||
} | ||
|
||
module.exports = Vault; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.