Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nodes dynamically to an AppScale deployment #163

Merged
merged 23 commits into from
Jan 10, 2013

Conversation

shatterednirvana
Copy link
Contributor

Receives requests from the appscale-tools and dynamically adds nodes to an already running AppScale deployment. Relies on appscale-add-instances (AppScale/appscale-tools#52).

To test, try following the documentation (https://github.com/AppScale/appscale/wiki/Adding-Machines-to-an-AppScale-Deployment) and verifying that it works. That document adds two nodes to an existing four node deployment in VirtualBox.

@@ -966,6 +966,103 @@ def remove_role(old_role, secret)
end


def start_roles_on_nodes(ips_hash, secret)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document all new functions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest putting this additional code in a new class since djinn.rb is already really large.

@nlake44
Copy link
Contributor

nlake44 commented Dec 11, 2012

The code currently does not work to correctly add new appengine nodes due to rabbitmq not coming up properly.

@@ -653,7 +653,7 @@ def stop_app(app_name, secret)

# Contact the soap server and remove the application
if (@app_names.include?(app_name) and !my_node.is_appengine?) or @nodes.length == 1
ip = HelperFunctions.read_file("#{APPSCALE_HOME}/.appscale/masters")
ip = HelperFunctions.read_file("/etc/appscale/masters")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move constant strings to global constants.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also for the other string constants below where you see fit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@ghost ghost assigned nlake44 Dec 18, 2012
…s location from a file written by the AppController, and extracted code to write /etc/hosts to a function so that we can invoke it when we add nodes
…ile written by the AppController, instead of assuming it runs locally
@shatterednirvana
Copy link
Contributor Author

As noted in the related tools diff (AppScale/appscale-tools#52), this refactoring enables 'appengine' to be the only role running by not hardcoding in the location of the RabbitMQ server as localhost or the AppLoadBalancer's location as localhost. Also updated the AppController to update /etc/hosts when nodes are added (else old nodes won't get an updated /etc/hosts).

Conflicts:
	AppController/djinn.rb
	AppController/lib/helperfunctions.rb
@nlake44
Copy link
Contributor

nlake44 commented Jan 10, 2013

Everything demo'ed fine with the exception of this issue: #245

nlake44 added a commit that referenced this pull request Jan 10, 2013
Add nodes dynamically to an AppScale deployment
@nlake44 nlake44 merged commit 012ad68 into AppScale:testing Jan 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants