Skip to content

Commit

Permalink
Merge pull request kubernetes#5913 from errordeveloper/master
Browse files Browse the repository at this point in the history
Minor updates to CoreOS/Weave implementation for Azure cloud
  • Loading branch information
erictune committed Mar 26, 2015
2 parents 5698c32 + b6cc4cb commit 884b893
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions docs/getting-started-guides/coreos/azure/lib/azure_wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ var inspect = require('util').inspect;
var util = require('./util.js');

var coreos_image_ids = {
'stable': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-557.2.0',
'beta': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-557.2.0',
'alpha': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-584.0.0',
'stable': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Stable-607.0.0',
'beta': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Beta-612.1.0', // untested
'alpha': '2b171e93f07c4903bcad35bda10acf22__CoreOS-Alpha-626.0.0', // untested
};

var conf = {};
Expand Down Expand Up @@ -165,17 +165,17 @@ exports.queue_default_network = function () {

exports.queue_storage_if_needed = function() {
if (!process.env['AZURE_STORAGE_ACCOUNT']) {
conf.storage_account = util.rand_suffix;
conf.resources['storage_account'] = util.rand_suffix;
task_queue.push([
'storage', 'account', 'create',
get_location(),
conf.storage_account,
conf.resources['storage_account'],
]);
process.env['AZURE_STORAGE_ACCOUNT'] = conf.storage_account;
process.env['AZURE_STORAGE_ACCOUNT'] = conf.resources['storage_account'];
} else {
// Preserve it for resizing, so we don't create a new one by accedent,
// when the environment variable is unset
conf.storage_account = process.env['AZURE_STORAGE_ACCOUNT'];
conf.resources['storage_account'] = process.env['AZURE_STORAGE_ACCOUNT'];
}
};

Expand Down Expand Up @@ -247,8 +247,7 @@ exports.destroy_cluster = function (state_file) {
});

task_queue.push(['network', 'vnet', 'delete', '--quiet', conf.resources['vnet']]);

// TODO: add storage deletion when AZURE_STORAGE_ACCOUNT is unset (depends on Azure/azure-xplat-cli#1615)
task_queue.push(['storage', 'account', 'delete', '--quiet', conf.resources['storage_account']]);

exports.run_task_queue();
};
Expand All @@ -265,5 +264,5 @@ exports.load_state_for_resizing = function (state_file, node_type, new_nodes) {
conf.nodes[node_type] += new_nodes;
hosts.collection = conf.hosts;
hosts.ssh_port_counter += conf.hosts.length;
process.env['AZURE_STORAGE_ACCOUNT'] = conf.storage_account;
process.env['AZURE_STORAGE_ACCOUNT'] = conf.resources['storage_account'];
}
2 changes: 1 addition & 1 deletion docs/getting-started-guides/coreos/azure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Ilya Dmitrichenko <[email protected]>",
"license": "Apache 2.0",
"dependencies": {
"azure-cli": "^0.8.15",
"azure-cli": "^0.8.16",
"colors": "^1.0.3",
"js-yaml": "^3.2.5",
"openssl-wrapper": "^0.2.1",
Expand Down

0 comments on commit 884b893

Please sign in to comment.