Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
First implementation of commands to run Origin.
Browse files Browse the repository at this point in the history
Still requires refinement based on most common use-cases.
  • Loading branch information
kraman committed Sep 11, 2013
1 parent fd593d8 commit b460288
Show file tree
Hide file tree
Showing 52 changed files with 3,162 additions and 653 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ rdoc
spec/reports
test/tmp
test/version_tmp
test/Vagrantfile
test/Vagrantfile
test/origin-server
test/puppet-openshift_origin
test/rhc
tmp
2 changes: 1 addition & 1 deletion .idea/.rakeTasks

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions .idea/vagrant-openshift.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

384 changes: 151 additions & 233 deletions .idea/workspace.xml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ source 'https://rubygems.org'

# Specify your gem's dependencies in vagrant-openshift.gemspec
gemspec

group :development do
# We depend on Vagrant for development, but we don't add it as a
# gem dependency because we expect to be installed within the
# Vagrant environment itself using `vagrant plugin`.
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git"
end
153 changes: 153 additions & 0 deletions README.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
== OpenShift Origin Build Tools

This is a link:http://www.vagrantup.com[Vagrant] 1.2+ plugin that adds command and provisioner to
build and test link:http://openshift.github.io[OpenShift Origin].

NOTE: This plugin requires Vagrant 1.2+

=== Features

* Compatible with VMs run via link:https://www.virtualbox.org[VirtualBox], link:https://github.com/mitchellh/vagrant-aws[AWS]
or link:https://github.com/tknerr/vagrant-managed-servers[managed] providers.
* Provides commands to install build dependencies, sync repositories, and run tests

=== Installing

To work on the *vagrant-openshift* plugin, clone this repository out, and use
link:http://gembundler.com[Bundler] to get the dependencies:

[source, sh]
----
$ bundle
----

Compile an install the plugin using Rake

[source, sh]
----
$ rake install
----

=== Getting started

==== Clone the OpenShift Origin repositories

[source, sh]
----
$ vagrant origin-local-checkout <github username>
----

This will clone 3 repositores from your link:http://www.github.com[GitHub] account and links it against the upstream repositories.

.GitHub repositories

* link:http://github.com/openshift/rhc[Command line tools]
* link:http://github.com/openshift/origin-server[OpenShift Origin console, broker and node]
* link:http://github.com/openshift/puppet-openshift_origin[Puppet module for OpenShift Origin]

==== Initialize the Vagrantfile

Create a Vagrantfile and customize it to match your requirements:

[source, sh]
----
$ vagrant origin-init
----

.Command options:

* Specify which OS to build with:
** --os fedora - Launch a Fedora 19 image
** --os rhel - Launch a RHEL image (where available)
** --os centos - Launch a CentOS image (where available)
* Build from bare installation of OS:
** --no-base

==== Start the machine

.VirtualBox

Running with the default VirtualBox provider

[source, sh]
----
vagrant up
----

.AWS/EC2

* Edit the Vagrantfile and update your EC2 credentials.

----
aws.access_key_id = "<API KEY>"
aws.secret_access_key = "<API SECRET>"
aws.keypair_name = "<SSH KEY NAME>"
override.ssh.private_key_path = "<PRIVATE KEY FILE>"
----

* Start the AWS machine

[source, sh]
----
vagrant up --provider=aws
----

NOTE: Requires latest link:https://github.com/mitchellh/vagrant-aws[AWS] provider.

NOTE: You can use the link:https://github.com/mikery/vagrant-ami[Vagrant-AMI] plugin to create an AMI from a running AWS machine.

.Managed

Running on other environments which are not managed by Vagrant directly.

* Edit the Vagrantfile and update the managed section to update the IP address, User name and SSH key.

----
managed.server = "HOST or IP of machine"
override.ssh.username = "root"
override.ssh.private_key_path = "~/.ssh/id_rsa"
----

* Start the AWS machine

[source, sh]
----
vagrant up --provider=managed
----

NOTE: Requires latest link:https://github.com/tknerr/vagrant-managed-servers[Managed] provider

==== Install build dependencies

If starting from a bare OS image, install the build and package dependencies.

[source, sh]
----
$ vagrant origin-build-base
----

NOTE: Its is a good idea to snapshot the VM after this step so that you don't have to redo this step every time.

==== Sync and Build OpenShift packages

[source, sh]
----
$ vagrant sync -l
----

==== Running OpenShift Origin Tests

.Running basic tests
[source, sh]
----
$ vagrant test --all
----

.Running extended tests
----
$ vagrant origin-test --extended --all
----

== Notice of Export Control Law

This software distribution includes cryptographic software that is subject to the U.S. Export Administration Regulations (the "*EAR*") and other U.S. and foreign laws and may not be exported, re-exported or transferred (a) to any country listed in Country Group E:1 in Supplement No. 1 to part 740 of the EAR (currently, Cuba, Iran, North Korea, Sudan & Syria); (b) to any prohibited destination or to any end user who has been prohibited from participating in U.S. export transactions by any federal agency of the U.S. government; or (c) for use in connection with the design, development or production of nuclear, chemical or biological weapons, or rocket systems, space launch vehicles, or sounding rockets, or unmanned air vehicle systems.You may not download this software or technical information if you are located in one of these countries or otherwise subject to these restrictions. You may not provide this software or technical information to individuals or entities located in one of these countries or otherwise subject to these restrictions. You are also responsible for compliance with foreign law requirements applicable to the import, export and use of this software and technical information.
21 changes: 0 additions & 21 deletions README.md

This file was deleted.

6 changes: 4 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ namespace :vagrant do
Rake::Task['build'].invoke
name = Bundler::GemHelper.instance.send(:name)
version = Bundler::GemHelper.instance.send(:version).to_s
system("vagrant plugin install pkg/#{name}-#{version}.gem")
Bundler.with_clean_env do
system("vagrant plugin install pkg/#{name}-#{version}.gem")
end
end
end

Bundler::GemHelper.install_tasks
task :default => "vagrant:install"
task :default => "vagrant:install"
51 changes: 0 additions & 51 deletions builder/Rakefile

This file was deleted.

2 changes: 1 addition & 1 deletion lib/vagrant-openshift.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module Vagrant
module Openshift
plugin_path = Pathname.new(File.expand_path("#{__FILE__}/../vagrant-openshift/"))

autoload :CommandHelper, plugin_path + "helpers/command_helper"
autoload :CommandHelper, plugin_path + "helper/command_helper"
autoload :Constants, plugin_path + "constants"
end
end
Expand Down
Loading

0 comments on commit b460288

Please sign in to comment.