├── requirements.txt ├── components ├── rhel │ ├── rhel-ose │ │ ├── .cdk │ │ ├── README.adoc │ │ └── Vagrantfile │ ├── README_CDK_ZIP.adoc │ ├── misc │ │ └── rhel-k8s-singlenode-setup │ │ │ ├── README.adoc │ │ │ └── Vagrantfile │ └── README.adoc └── centos │ ├── centos-docker-base-setup │ ├── README.adoc │ └── Vagrantfile │ ├── centos-mesos-marathon-singlenode-setup │ ├── README.adoc │ └── Vagrantfile │ ├── centos-k8s-singlenode-setup │ ├── README.adoc │ └── Vagrantfile │ └── centos-openshift-setup │ ├── README.adoc │ └── Vagrantfile ├── .travis.yml ├── .gitignore ├── MAINTAINERS ├── CONTRIBUTING.adoc ├── docs ├── cockpit.adoc ├── building.adoc ├── updating.adoc ├── staging.adoc ├── troubleshooting.adoc ├── installing.adoc └── using.adoc ├── tests ├── rhel-with-docker │ └── test-rhel-docker.sh └── standalone-rhel │ ├── test-base-rhel.sh │ └── test-base-rhel.withKnownBug.sh ├── adb.dict ├── src └── spellcheck.py ├── README.adoc ├── CHANGELOG.adoc └── LICENSE /requirements.txt: -------------------------------------------------------------------------------- 1 | pyenchant==1.6.6 2 | -------------------------------------------------------------------------------- /components/rhel/rhel-ose/.cdk: -------------------------------------------------------------------------------- 1 | openshift.auth.scheme=Basic 2 | openshift.auth.username=openshift-dev 3 | openshift.auth.password=devel 4 | cdk.box.version=2.4 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "2.7" 4 | before_install: 5 | - sudo apt-get update -qq 6 | - sudo apt-get install -y python-pykickstart 7 | - sudo apt-get install -y python-enchant 8 | install: 9 | - "pip install -r requirements.txt" 10 | script: 11 | - "ksvalidator build_tools/kickstarts/centos-7-adb-vagrant.ks" 12 | - "python src/spellcheck.py ." 13 | notifications: 14 | email: false 15 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | /.config 4 | /coverage/ 5 | /InstalledFiles 6 | /pkg/ 7 | /spec/reports/ 8 | /test/tmp/ 9 | /test/version_tmp/ 10 | /tmp/ 11 | 12 | ## Specific to RubyMotion: 13 | .dat* 14 | .repl_history 15 | build/ 16 | 17 | ## Documentation cache and generated files: 18 | /.yardoc/ 19 | /_yardoc/ 20 | /doc/ 21 | /rdoc/ 22 | 23 | ## Environment normalisation: 24 | /.bundle/ 25 | /lib/bundler/man/ 26 | 27 | # for a library or gem, you might want to ignore these files since the code is 28 | # intended to run in multiple environments; otherwise, check them in: 29 | # Gemfile.lock 30 | # .ruby-version 31 | # .ruby-gemset 32 | 33 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: 34 | .rvmrc 35 | 36 | #emacs 37 | .#* 38 | 39 | **/.vagrant 40 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Project/Code Maintainers 2 | ------------------------ 3 | - Brian Exelbierd @bexelbie 4 | - Praveen Kumar @praveenkumar 5 | - Lalatendu Mohanty @LalatenduMohanty 6 | - Navid Shaikh @navidshaikh 7 | - Budh Ram Gurung @budhrg 8 | - Josef Strzibny @strzibny 9 | - Langdon White @whitel 10 | 11 | atlas.hashicorp.com/projectatomic/adb Maintainers 12 | ------------------------------------------------- 13 | - Brian Exelbierd @bexelbie 14 | - Praveen Kumar @praveenkumar 15 | - Lalatendu Mohanty @LalatenduMohanty 16 | - Joe Brockmeier @jzb - Project Level Backup 17 | -------------------------------------------------------------------------------- /CONTRIBUTING.adoc: -------------------------------------------------------------------------------- 1 | = Contributing to ADB 2 | 3 | The following is a set of guidelines for contributing to ADB, which is 4 | hosted in the https://github.com/projectatomic[Project Atomic 5 | Organization] on GitHub. These are just guidelines, please use your best 6 | judgment and feel free to propose changes to this document in a pull 7 | request. 8 | 9 | At this point, this document is not complete, but as decisions are made 10 | on 11 | https://www.redhat.com/mailman/listinfo/container-tools[container-tools@redhat.com] 12 | ML they will be added to this document. 13 | 14 | [[pull-requests]] 15 | == Pull Requests 16 | 17 | * All changes should be made by pull request (PR), even from core 18 | committers/maintainers. 19 | 20 | * All changes need 2 ACKs from maintainers before they will be approved 21 | for inclusion. If the author of the PR is a maintainer, the submission 22 | is considered 1 of the 2 ACKs. Therefore PRs from maintainers only 23 | require one additional ACK. By "2 ACKs" we mean that 2 maintainers must 24 | acknowledge that the change is a good one. The 2nd person to ACK the PR 25 | should merge the PR with a comment including their agreement. 26 | -------------------------------------------------------------------------------- /components/centos/centos-docker-base-setup/README.adoc: -------------------------------------------------------------------------------- 1 | = Vagrantfile: CentOS Docker Base 2 | :toc: 3 | 4 | This Vagrantfile is the default suggested configuration for ADB. 5 | This file sets up private networking that will be used to expose the 6 | docker daemon to the host. This Vagrantfile is useful for anyone using 7 | host-based tools, such as the 8 | https://wiki.eclipse.org/Linux_Tools_Project/Docker_Tooling[Eclipse 9 | docker tooling] or the docker CLI, with ADB. 10 | 11 | [[quickstart]] 12 | == Quickstart 13 | 14 | . Get latest ADB box and add it to vagrant as described in 15 | link:../../../docs/installing.adoc[Installing Atomic Developer Bundle]. 16 | 17 | . Create a directory for the Vagrant Box. 18 | + 19 | ---- 20 | $ mkdir directory && cd directory 21 | ---- 22 | 23 | . Download the Vagrantfile. 24 | + 25 | ---- 26 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-docker-base-setup/Vagrantfile > Vagrantfile 27 | ---- 28 | 29 | . Start the Vagrant Box. 30 | + 31 | ---- 32 | $ vagrant up 33 | ---- 34 | 35 | . Proceed with using ADB as described in link:../../../docs/using.adoc[Using Atomic Developer Bundle]. 36 | -------------------------------------------------------------------------------- /docs/cockpit.adoc: -------------------------------------------------------------------------------- 1 | = Using Cockpit with Atomic Developer Bundle 2 | :toc: 3 | 4 | http://cockpit-project.org/[Cockpit] makes it easy to administer your 5 | GNU/Linux servers via a web browser. It can manage system resources and 6 | has special functionality built in for managing docker containers. 7 | Specifically for containers, it can: 8 | 9 | * Display a list of images 10 | * Display a list of containers (started and stopped) 11 | * Start and stop containers 12 | * Pull and delete images 13 | 14 | [[accessing-cockpit]] 15 | == Accessing Cockpit in ADB 16 | 17 | These instructions are written assuming you are at a command prompt on 18 | the host you are running ADB on. 19 | 20 | . Start ADB. 21 | 22 | . Start Cockpit. 23 | + 24 | `$ vagrant ssh -c "sudo systemctl start cockpit"` 25 | 26 | . Determine the IP Address of ADB 27 | + 28 | `$ vagrant service-manager box ip` 29 | 30 | . Open cockpit in your web browser using the IP address above: 31 | + 32 | `http://:9090/` 33 | + 34 | You may need to accept a TLS certificate as cockpit generates a 35 | self-signed SSL certificate. 36 | 37 | . You may now use cockpit on ADB. Two users are available by 38 | default. The username for a standard user is `vagrant` the password is 39 | `vagrant`. The root user has a password of `vagrant`. 40 | -------------------------------------------------------------------------------- /docs/building.adoc: -------------------------------------------------------------------------------- 1 | = Building the ADB Vagrant Box 2 | 3 | The Vagrant box is based on CentOS 7. It is built using the latest 4 | packages from CentOS core. Some components of ADB will be delivered 5 | in containers and will use code drawn from upstream projects to add 6 | newer features. Today, the fully built box does not include any docker image. + 7 | The box can be built using the CentOS powered 8 | https://wiki.centos.org/HowTos/CommunityBuildSystem[Community Build 9 | System (CBS)]. 10 | 11 | To build the box: 12 | 13 | . Get access for building images in the CBS by following the directions 14 | here: http://wiki.centos.org/HowTos/CommunityBuildSystem 15 | + 16 | *Note:* You need to request both _build_ and _image_ permissions. 17 | . Checkout/git clone this repository: 18 | + 19 | `git clone https://github.com/projectatomic/adb-atomic-developer-bundle` 20 | . Change your current working directory to adb-atomic-developer-bundle: 21 | + 22 | `cd adb-atomic-developer-bundle` 23 | 24 | . Run the following script: 25 | + 26 | `./build_tools/build_scripts/do_vagrant_cbs.sh` 27 | + 28 | *Note:* This script assumes you have a profile in your 29 | `$HOME/.koji/config called "cbs"`. If this is your only usage of koji, 30 | delete the `-p cbs` from the command in the script. If you use multiple 31 | instances of koji, either rename your config for the CBS or change the 32 | script. 33 | + 34 | Here is an example koji scratch build: 35 | http://cbs.centos.org/koji/taskinfo?taskID=13349 36 | -------------------------------------------------------------------------------- /components/rhel/README_CDK_ZIP.adoc: -------------------------------------------------------------------------------- 1 | = Container Development Kit Upstream Components 2 | 3 | Here is the mapping of upstream projects and READMEs for CDK.zip file 4 | shipped with CDK: 5 | 6 | .... 7 | ├── components 8 | │ └── rhel 9 | │ ├── misc 10 | │ │ └── rhel-k8s-singlenode-setup 11 | │ │ ├── README.adoc 12 | │ │ └── Vagrantfile 13 | │ └── rhel-ose 14 | │ ├── README.adoc 15 | │ └── Vagrantfile 16 | ├── LICENSE 17 | ├── plugins 18 | │ ├── vagrant-registration.gem 19 | │ ├── vagrant-registration-README.md 20 | │ ├── vagrant-sshfs.gem 21 | │ ├── vagrant-sshfs-README.md 22 | │ ├── vagrant-service-manager.gem 23 | │ └── vagrant-service-manager-README.adoc 24 | └── README.md 25 | .... 26 | 27 | The components directory represents files in the current 28 | link:.[directory]. 29 | 30 | The `plugins` directory contains Vagrant plugins and respective README files: 31 | 32 | * `vagrant-service-manager` 33 | ** GitHub: https://github.com/projectatomic/vagrant-service-manager 34 | ** README: https://github.com/projectatomic/vagrant-service-manager/blob/master/README.adoc 35 | 36 | * `vagrant-registration` 37 | ** GitHub: https://github.com/projectatomic/adb-vagrant-registration 38 | ** README: https://github.com/projectatomic/adb-vagrant-registration/blob/master/README.adoc 39 | 40 | * `vagrant-sshfs` 41 | ** GitHub: https://github.com/dustymabe/vagrant-sshfs 42 | ** README: https://github.com/dustymabe/vagrant-sshfs/blob/master/README.adoc 43 | -------------------------------------------------------------------------------- /components/centos/centos-mesos-marathon-singlenode-setup/README.adoc: -------------------------------------------------------------------------------- 1 | = Vagrantfile: CentOS Single-Node Mesos Marathon 2 | :toc: 3 | 4 | This Vagrantfile sets up ADB for development with Mesos and Marathon. It 5 | also sets up private networking that will be used to expose the services 6 | to the host. This Vagrantfile is based on 7 | https://atlas.hashicorp.com/projectatomic/boxes/adb[ADB] vagrant box. It 8 | sets up Mesos master & slave and Marathon on a CentOS 7 system. It uses 9 | the rpm packages for these from 10 | http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-1.noarch.rpm[Mesosphere repo]. 11 | 12 | [[quickstart]] 13 | == Quickstart 14 | 15 | To setup a virtualization provider or to install Vagrant refer to the 16 | link:../../../docs/installing.adoc[Installing Atomic Developer Bundle]. 17 | 18 | To bring up a Vagrant box using a different virtualization provider, 19 | replace `libvirt` in the following command with the provider of your choice. 20 | 21 | .... 22 | $ sudo vagrant up --provider=libvirt 23 | .... 24 | 25 | [NOTE] 26 | ==== 27 | The Vagrantfile for this setup has an embedded 28 | http://www.ansible.com/[Ansible] playbook that will take care of most of 29 | the provisioning. Depending on your Internet connection, the box should 30 | be up and running with all the necessary packages installed within a few 31 | minutes to about an hour. 32 | ==== 33 | 34 | Once the box is up, you can access Mesos master UI on 35 | http://10.2.2.2:5050[10.2.2.2:5050] and Marathon UI on 36 | http://10.2.2.2:8080[10.2.2.2:8080] if you've not changed the value of 37 | the parameter *ip* in Vagrantfile. 38 | -------------------------------------------------------------------------------- /components/centos/centos-k8s-singlenode-setup/README.adoc: -------------------------------------------------------------------------------- 1 | = Vagrantfile: CentOS Single-Node Kubernetes 2 | :toc: 3 | 4 | This Vagrantfile is the suggested configuration for using ADB with 5 | Kubernetes. This file sets up private networking that will be used to 6 | expose the docker daemon and kubernetes to the host. This file also sets 7 | up a single node Kubernetes instance where the master and node are on 8 | the same machine. 9 | 10 | This Vagrantfile is useful for anyone using host-based tools, such as 11 | the https://wiki.eclipse.org/Linux_Tools_Project/Docker_Tooling[Eclipse 12 | docker tooling] or the kubernetes and docker CLIs, with ADB. 13 | 14 | [[quickstart]] 15 | == Quickstart 16 | 17 | . Get the latest ADB box and add it to vagrant as described in 18 | link:../../../docs/installing.adoc[Installing Atomic Developer Bundle]. 19 | 20 | . Create a directory for the Vagrant Box. 21 | + 22 | ---- 23 | $ mkdir directory && cd directory 24 | ---- 25 | 26 | . Download the Vagrantfile. 27 | + 28 | ---- 29 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-k8s-singlenode-setup/Vagrantfile > Vagrantfile 30 | ---- 31 | 32 | . Start the Vagrant Box. 33 | + 34 | ---- 35 | $ vagrant up 36 | ---- 37 | 38 | . Proceed with using ADB as described in link:../../../docs/using.adoc[Using Atomic Developer Bundle]. 39 | 40 | [[verifying-the-installation]] 41 | == Verifying the installation 42 | 43 | You may wish to `vagrant ssh` into ADB and verify that Kubernetes is 44 | setup using the `kubectl` CLI as follows: 45 | 46 | ---- 47 | $ kubectl get nodes 48 | NAME LABELS STATUS 49 | 127.0.0.1 kubernetes.io/hostname=127.0.0.1 Ready 50 | ---- 51 | -------------------------------------------------------------------------------- /tests/rhel-with-docker/test-rhel-docker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH="/bin:/usr/bin" 4 | STATUS=0 5 | 6 | #get the plugin installed 7 | vagrant plugin install vagrant-registration 8 | 9 | #do we have any now? 10 | exec 5>&1 && OUTPUT=$(vagrant plugin list | tee >(cat - >&5)) 11 | if [ $? -ne 0 ]; then 12 | STATUS=$? 13 | echo "No plugins at all: Vagrant plugin test FAILED" 14 | exit $STATUS 15 | fi 16 | 17 | #do we have the reg plugin? 18 | TEST=$(echo "$OUTPUT" | grep vagrant-registration) 19 | STATUS=$? 20 | if [ -z "$TEST" ]; then 21 | echo "Plugin vagrant-registration did not get installed: Vagrant plugin test FAILED" 22 | echo "Output of vagrant plugin list:\n$OUTPUT\n" 23 | echo "Result of \"echo \$OUTPUT | grep vagrant-registration\":\n$TEST\n" 24 | exit $STATUS 25 | fi 26 | 27 | #lets pull over the files to test 28 | cp -R ./../components/rhel-with-docker ./ 29 | cd rhel-with-docker/dev/ 30 | 31 | echo "incomplete test" 32 | exit 33 | 34 | #lets try and bring the machine up 35 | OUTPUT=$(vagrant up | tee >(cat - >&5)) 36 | STATUS=$? 37 | if [ $? -ne 0 ]; then 38 | echo "Failed to bring up the machine: Launch FAILED" 39 | exit $STATUS 40 | fi 41 | 42 | #lets test that we can connect 43 | OUTPUT=$(vagrant ssh -c 'echo \"connected!\"' | tee >(cat - >&5)) 44 | STATUS=$? 45 | TEST=$(echo "$OUTPUT" | grep connected) 46 | if [ -z "$TEST" ]; then 47 | echo "Failed to connect to the machine: connect FAILED" 48 | exit $STATUS 49 | fi 50 | 51 | #lets test that we are subscribed 52 | OUTPUT=$(vagrant ssh -c 'sudo subscription-manager status' | tee >(cat - >&5)) 53 | STATUS=$? 54 | TEST=$(echo "$OUTPUT" | grep Current) 55 | if [ -z "$TEST" ]; then 56 | echo "We are not subscribed: subscribe FAILED" 57 | exit $STATUS 58 | fi 59 | 60 | #time to clean up 61 | vagrant destroy -f 62 | rm -rf .vagrant.d Vagrantfile 63 | 64 | echo "Test(s) complete!" 65 | -------------------------------------------------------------------------------- /tests/standalone-rhel/test-base-rhel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH="/bin:/usr/bin" 4 | STATUS=0 5 | 6 | echo "get the plugin installed" 7 | vagrant plugin install vagrant-registration 8 | 9 | echo "do we have any plugins now?" 10 | exec 5>&1 && OUTPUT=$(vagrant plugin list | tee >(cat - >&5)) 11 | if [ $? -ne 0 ]; then 12 | STATUS=$? 13 | echo "No plugins at all: Vagrant plugin test FAILED" 14 | exit $STATUS 15 | fi 16 | 17 | echo "do we have the vagrant-registration plugin?" 18 | TEST=$(echo "$OUTPUT" | grep vagrant-registration) 19 | STATUS=$? 20 | if [ -z "$TEST" ]; then 21 | echo "Plugin vagrant-registration did not get installed: Vagrant plugin test FAILED" 22 | echo "Output of vagrant plugin list:\n$OUTPUT\n" 23 | echo "Result of \"echo \$OUTPUT | grep vagrant-registration\":\n$TEST\n" 24 | exit $STATUS 25 | fi 26 | 27 | echo "let's pull over the vagrantfile to test" 28 | rm ./Vagrantfile 29 | ln -s ../../components/standalone-rhel/Vagrantfile ./ 30 | 31 | echo "let's try and bring the machine up" 32 | exec 5>&1 && OUTPUT=$(vagrant up | tee >(cat - >&5)) 33 | STATUS=$? 34 | if [ $? -ne 0 ]; then 35 | echo "Failed to bring up the machine: Launch FAILED" 36 | exit $STATUS 37 | fi 38 | 39 | echo "let's test that we can connect" 40 | OUTPUT=$(vagrant ssh -c 'echo \"connected!\"' | tee >(cat - >&5)) 41 | STATUS=$? 42 | TEST=$(echo "$OUTPUT" | grep connected) 43 | if [ -z "$TEST" ]; then 44 | echo "Failed to connect to the machine: connect FAILED" 45 | exit $STATUS 46 | fi 47 | 48 | echo "let's test that we are subscribed" 49 | OUTPUT=$(vagrant ssh -c 'sudo subscription-manager status' | tee >(cat - >&5)) 50 | STATUS=$? 51 | TEST=$(echo "$OUTPUT" | grep Current) 52 | if [ -z "$TEST" ]; then 53 | echo "We are not subscribed: subscribe FAILED" 54 | exit $STATUS 55 | fi 56 | 57 | echo "time to clean up" 58 | vagrant destroy -f 59 | rm -rf .vagrant.d Vagrantfile 60 | 61 | echo "tests complete!" 62 | -------------------------------------------------------------------------------- /docs/updating.adoc: -------------------------------------------------------------------------------- 1 | = Updating Atomic Developer Bundle to the latest version 2 | :toc: 3 | :toc-placement!: 4 | 5 | Depending on your implementation of ADB, you might be able to 6 | directly update your Vagrant box. In some cases, you will need to 7 | perform a clean installation or follow additional steps to complete the 8 | update. 9 | 10 | ''' 11 | toc::[] 12 | ''' 13 | 14 | [[prerequisites]] 15 | == Prerequisites 16 | 17 | . If ADB is running, run the vagrant halt command: 18 | + 19 | .... 20 | # vagrant halt 21 | .... 22 | 23 | . Delete the virtual machine with the vagrant destroy command. This 24 | action will also delete any data or configuration in your ADB that is 25 | not saved on your host machine: 26 | + 27 | .... 28 | # vagrant destroy 29 | .... 30 | 31 | [[update-from-atlas-hashicorp]] 32 | == Update ADB from atlas.hashicorp.com 33 | 34 | If you use ADB images from atlas.hashicorp.com, you can perform a direct 35 | update of the Vagrant boxes. 36 | 37 | . Run the following command to check if a newer version of the box is 38 | available: 39 | + 40 | .... 41 | # vagrant box outdated 42 | .... 43 | 44 | . If a newer version is available, the output should look like this: 45 | + 46 | .... 47 | Checking if box 'projectatomic/adb' is up to date... 48 | A newer version of the box 'projectatomic/adb-testing' is available! You 49 | currently have version '1.3.1'. The latest is version '1.3.2'. Run `vagrant 50 | box update` to update. 51 | .... 52 | 53 | . If you see the above output, update the ADB Vagrant image with this 54 | command: 55 | + 56 | .... 57 | # vagrant box update 58 | .... 59 | 60 | [[update-from-cloud-centos]] 61 | == Update ADB from cloud.centos.org 62 | 63 | If you use ADB images from cloud.centos.org, you must manually remove 64 | the previously-installed boxes from your host machine and perform a 65 | clean installation. 66 | 67 | . Monitor the mailing list and other announcement points to determine 68 | if a new image is available. 69 | 70 | . Download the latest image and perform a clean install as described 71 | in the link:installing.adoc[installation documentation]. 72 | -------------------------------------------------------------------------------- /docs/staging.adoc: -------------------------------------------------------------------------------- 1 | = Staging your application with the OpenShift registry 2 | 3 | You can prepare your application for production locally with the internal OpenShift 4 | Docker registry. 5 | 6 | The scenario assumes the following parameters: 7 | 8 | - OpenShift registry endpoint is *hub.openshift.adb* 9 | - OpenShift instance URL is *https://10.1.2.2:8443* 10 | - Username/password credentials is *openshift-dev/devel* 11 | - Default ADB project name is *sample-project* 12 | - Application name is *my-app* 13 | 14 | This scenario is intended to illustrate how to test an application Docker image to 15 | a local instance of OpenShift platform that runs in the ADB box which on your host 16 | before push the image to a public instance of OpenShift. 17 | 18 | . Expose the host name of the OpenShift registry with the `vagrant service-manager env` 19 | command. 20 | + 21 | ---- 22 | $ vagrant service-manager env openshift 23 | 24 | # You can access the OpenShift console on: https://10.1.2.2:8443/console 25 | # To use OpenShift CLI, run: oc login https://10.1.2.2:8443 26 | export OPENSHIFT_URL=https://10.1.2.2:8443 27 | export OPENSHIFT_WEB_CONSOLE=https://10.1.2.2:8443/console 28 | export DOCKER_REGISTRY=hub.openshift.adb 29 | 30 | # run the following command to configure your shell. 31 | # eval "$(vagrant service-manager env openshift)" 32 | ---- 33 | 34 | . Build the Docker image as usual. 35 | 36 | . Make sure you are logged in to OpenShift. 37 | + 38 | ---- 39 | $ oc login 10.1.2.2:8443 -u openshift-dev -p devel 40 | ---- 41 | 42 | . Tag the image against the OpenShift registry with the hostname that you retrieved 43 | from the `vagrant service-manager env` command. 44 | + 45 | ---- 46 | $ docker tag my-app hub.openshift.adb/sample-project/my-app 47 | ---- 48 | 49 | . Log in to the OpenShift registry. 50 | + 51 | ---- 52 | $ docker login -u openshift-dev -p `oc whoami -t` -e foo@bar.com hub.openshift.adb 53 | ---- 54 | 55 | . Push the image to the registry to create an image stream with the same name as 56 | the application. 57 | + 58 | ---- 59 | $ docker push hub.openshift.adb/sample-project/my-app 60 | ---- 61 | 62 | . Create an application from the image stream and expose the image. 63 | + 64 | ---- 65 | $ oc new-app --image-stream=my-app --name=my-app 66 | $ oc expose service my-app --hostname=my-app.adb 67 | ---- 68 | -------------------------------------------------------------------------------- /tests/standalone-rhel/test-base-rhel.withKnownBug.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH="/bin:/usr/bin" 4 | STATUS=0 5 | 6 | echo "get the plugin installed" 7 | vagrant plugin install vagrant-registration 8 | 9 | echo "do we have any plugins now?" 10 | exec 5>&1 && OUTPUT=$(vagrant plugin list | tee >(cat - >&5)) 11 | if [ $? -ne 0 ]; then 12 | STATUS=$? 13 | echo "No plugins at all: Vagrant plugin test FAILED" 14 | exit $STATUS 15 | fi 16 | 17 | echo "do we have the vagrant-registration plugin?" 18 | TEST=$(echo "$OUTPUT" | grep vagrant-registration) 19 | STATUS=$? 20 | if [ -z "$TEST" ]; then 21 | echo "Plugin vagrant-registration did not get installed: Vagrant plugin test FAILED" 22 | echo "Output of vagrant plugin list:\n$OUTPUT\n" 23 | echo "Result of \"echo \$OUTPUT | grep vagrant-registration\":\n$TEST\n" 24 | exit $STATUS 25 | fi 26 | 27 | echo "let\'s pull over the vagrantfile to test" 28 | rm ./Vagrantfile 29 | ln -s ../../components/standalone-rhel/Vagrantfile ./ 30 | 31 | echo "let\'s try and bring the machine up \(but without provisioning to work around https://github.com/whitel/vagrant-registration/issues/8\)" 32 | exec 5>&1 && OUTPUT=$(vagrant up --no-provision | tee >(cat - >&5)) 33 | STATUS=$? 34 | if [ $? -ne 0 ]; then 35 | echo "Failed to bring up the machine: Launch FAILED" 36 | exit $STATUS 37 | fi 38 | 39 | echo "let\'s test that we can connect" 40 | OUTPUT=$(vagrant ssh -c 'echo \"connected!\"' | tee >(cat - >&5)) 41 | STATUS=$? 42 | TEST=$(echo "$OUTPUT" | grep connected) 43 | if [ -z "$TEST" ]; then 44 | echo "Failed to connect to the machine: connect FAILED" 45 | exit $STATUS 46 | fi 47 | 48 | echo "let\'s test that we are subscribed" 49 | OUTPUT=$(vagrant ssh -c 'sudo subscription-manager status' | tee >(cat - >&5)) 50 | STATUS=$? 51 | TEST=$(echo "$OUTPUT" | grep Current) 52 | if [ -z "$TEST" ]; then 53 | echo "We are not subscribed: subscribe FAILED" 54 | exit $STATUS 55 | fi 56 | 57 | echo "let\'s try and do the provisioning" 58 | OUTPUT=$(vagrant up --provision | tee >(cat - >&5)) 59 | STATUS=$? 60 | if [ $? -ne 0 ]; then 61 | echo "Failed to provision the machine: Launch FAILED" 62 | exit $STATUS 63 | fi 64 | 65 | echo "time to clean up" 66 | vagrant destroy -f 67 | rm -rf .vagrant.d Vagrantfile 68 | 69 | echo "tests complete!" 70 | -------------------------------------------------------------------------------- /adb.dict: -------------------------------------------------------------------------------- 1 | scl 2 | epel 3 | Nulecule 4 | nd 5 | Bluejean 6 | tcp 7 | etcd 8 | PRs 9 | microservice 10 | systemd 11 | Kubernetes 12 | Vagranfile 13 | downloded 14 | AWS 15 | init 16 | adb 17 | Cygwin 18 | md 19 | ninjs 20 | devel 21 | quickref 22 | systemctl 23 | dap 24 | autopopulate 25 | LibVirt 26 | VirtualBox 27 | Pre 28 | committers 29 | singlenode 30 | vagrantup 31 | Vagrantfile 32 | libyaml 33 | da 34 | confCode 35 | nfs 36 | UserManual 37 | wiki 38 | service-manager 39 | vagrant-service-manager 40 | www 41 | centos 42 | softwarecollections 43 | OSs 44 | roadmap 45 | virtualization 46 | plugins 47 | Dockerfile 48 | php 49 | dkms 50 | rsync 51 | nulecule 52 | projectatomic 53 | docutils 54 | listNumbersByCode 55 | listinfo 56 | internet 57 | dhcp 58 | irc 59 | OpenShift 60 | Hashicorp's 61 | githubusercontent 62 | GCE 63 | QuickStart 64 | workflow 65 | intercallonline 66 | symlink 67 | helloapache 68 | dnf 69 | org 70 | PAAS 71 | freenode 72 | Centos 73 | plugin 74 | App 75 | reStructuredText 76 | oc 77 | sclo 78 | HowTos 79 | taskID 80 | Vagrantfiles 81 | TBD 82 | kubectl 83 | redhat 84 | rEolFe 85 | ACK 86 | apps 87 | app 88 | koji 89 | cd 90 | deltarpm 91 | mingw 92 | wget 93 | IDE 94 | virtualbox 95 | aweiteka 96 | GitHub 97 | CLIs 98 | orchestrators 99 | startingvboxonlinux 100 | mkdir 101 | devops 102 | libvirtd 103 | rhel 104 | https 105 | architecting 106 | README 107 | Dockerfiles 108 | repos 109 | writeable 110 | pythonhosted 111 | enablement 112 | CLI 113 | hypervisors 114 | atomicapp 115 | ADB 116 | AtomicDeveloperBundle 117 | rst 118 | ContainerPipeline 119 | VMs 120 | PaaS 121 | quickstart 122 | CommunityBuildSystem 123 | Roadmap 124 | mv 125 | RHEL 126 | VMWare 127 | pre 128 | TLS 129 | trello 130 | ACKs 131 | vagrantfile 132 | nodejs 133 | utils 134 | sudo 135 | fedoraproject 136 | vm 137 | cbs 138 | oneline 139 | io 140 | sourceforge 141 | Openshift 142 | UATFramework 143 | hostname 144 | hashicorp 145 | html 146 | online 147 | config 148 | openshift 149 | bexelbie 150 | taskinfo 151 | UTC 152 | PyYAML 153 | devassistant 154 | http 155 | urls 156 | kubernetes 157 | IP 158 | DevAssistant 159 | june 160 | VM 161 | libvirt 162 | cygwin 163 | sL 164 | IRC 165 | repo 166 | github 167 | Mesos 168 | CentOS 169 | Virtualization 170 | vboxdrv 171 | setx 172 | -------------------------------------------------------------------------------- /components/rhel/misc/rhel-k8s-singlenode-setup/README.adoc: -------------------------------------------------------------------------------- 1 | = Vagrantfile: Single-Node Kubernetes 2 | :toc: 3 | :toc-placement!: 4 | 5 | This Vagrantfile is the suggested configuration for using the CDK with 6 | Kubernetes. This file sets up private networking that will be used to 7 | expose the docker daemon and Kubernetes to the host. This Vagrant file 8 | also sets up a single node Kubernetes instance where the master and node 9 | are on the same machine. 10 | 11 | This Vagrantfile is useful for anyone using host-based tools, such as 12 | the https://wiki.eclipse.org/Linux_Tools_Project/Docker_Tooling[Eclipse 13 | docker tooling] or the kubectl, oc and docker CLIs, with the CDK. 14 | 15 | ''' 16 | toc::[] 17 | ''' 18 | 19 | [[quickstart]] 20 | == Quickstart 21 | 22 | . Create a directory for the Vagrant Box. 23 | + 24 | ---- 25 | $ mkdir directory && cd directory 26 | ---- 27 | 28 | . Get the latest CDK box using Developer Subscription. You can download 29 | the CDK and find further information about CDK 30 | http://developers.redhat.com/products/cdk/overview/[here]. For detailed instructions on how to install CDK refer to the 31 | https://access.redhat.com/documentation/en/red-hat-container-development-kit/2.2/paged/installation-guide[CDK Installation Guide]. 32 | 33 | + 34 | [NOTE] 35 | ==== 36 | If you want to use a customized name for the box, you need to: 37 | 38 | * Specify your `` in place of `cdkv2` as in: 39 | ---- 40 | $ vagrant box add --name /rhel-cdk-kubernetes-7.2-*.x86_64.vagrant-libvirt.box 41 | ---- 42 | * Add the `` as the value of the `BOX` environment variable with the following command: 43 | ---- 44 | export BOX= 45 | ---- 46 | ==== 47 | + 48 | 49 | . Download the Vagrantfile. 50 | + 51 | ---- 52 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/rhel/misc/rhel-k8s-singlenode-setup/Vagrantfile > Vagrantfile 53 | ---- 54 | 55 | . Start the Vagrant Box. 56 | + 57 | ---- 58 | $ vagrant up 59 | ---- 60 | 61 | . Proceed with using the CDK box. 62 | 63 | [[verifying-install]] 64 | == Verifying the installation 65 | 66 | You may wish to `vagrant ssh` into the CDK and verify that Kubernetes is 67 | setup using the `kubectl` CLI as follows: 68 | 69 | ---- 70 | $ kubectl get nodes 71 | NAME LABELS STATUS 72 | 127.0.0.1 kubernetes.io/hostname=127.0.0.1 Ready 73 | ---- 74 | -------------------------------------------------------------------------------- /src/spellcheck.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | # Copyright © 2015 Praveen Kumar 5 | # 6 | # This copyrighted material is made available to anyone wishing to use, 7 | # modify, copy, or redistribute it subject to the terms and conditions 8 | # of the GNU General Public License v.2, or (at your option) any later 9 | # version. This program is distributed in the hope that it will be 10 | # useful, but WITHOUT ANY WARRANTY expressed or implied, including the 11 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 | # PURPOSE. See the GNU General Public License for more details. You 13 | # should have received a copy of the GNU General Public License along 14 | # with this program; if not, write to the Free Software Foundation, 15 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 | # 17 | 18 | 19 | # Usage python spellcheck.py 20 | 21 | """ 22 | Sample Usage: 23 | $ python spellcheck.py ../docs/ 24 | +128 ../docs/installing.rst : scl 25 | Output format: 26 | + 27 | If you use vim then directly copy/paste `vim + ` and you 28 | correct misspelled word fast. 29 | You can add word to validwords file so it will added to custom dictionary which 30 | passed to SpellChecker 31 | """ 32 | 33 | import os 34 | from argparse import ArgumentParser 35 | from enchant import DictWithPWL 36 | from enchant.checker import SpellChecker 37 | 38 | my_dict = DictWithPWL("en_US", "adb.dict") 39 | checker = SpellChecker(my_dict) 40 | file_extension = ['.md', '.txt', '.rst'] 41 | 42 | def list_files(rootdir): 43 | file_list = [] 44 | for root, subdirs, files in os.walk(rootdir): 45 | for name in files: 46 | if os.path.splitext(name)[-1] in file_extension: 47 | file_list.append(os.path.join(root, name)) 48 | return file_list 49 | 50 | def check_spell(file_name): 51 | with open(file_name) as fh: 52 | for num, line in enumerate(fh, 1): 53 | checker.set_text(line) 54 | for err in checker: 55 | print "+%d %s : %s" % (num, file_name, err.word) 56 | 57 | if __name__ == '__main__': 58 | parser = ArgumentParser(description='Spell checks using en_US dictionary') 59 | parser.add_argument('path', type=str, 60 | help='Provide absoulte path of file/folder to spellcheck') 61 | args = parser.parse_args() 62 | file_list = list_files(args.path) 63 | for file_path in file_list: 64 | check_spell(file_path) 65 | -------------------------------------------------------------------------------- /components/rhel/README.adoc: -------------------------------------------------------------------------------- 1 | = Components for Container Development Kit 2 | :toc: 3 | 4 | [[what-is-cdk]] 5 | == What is the Red Hat Container Development Kit 6 | 7 | Red Hat Container Development Kit (CDK) is a set of tools that helps you 8 | quickly and easily set up an environment for developing and testing 9 | containerized applications on the Red Hat Enterprise Linux platform. Red 10 | Hat CDK is available for Microsoft Windows, Mac OS X, and Linux 11 | operating systems, thus allowing you to use your favorite platform to 12 | produce applications that are ready to deploy in the Red Hat Enterprise 13 | Linux ecosystem. 14 | 15 | Red Hat CDK is a part of the Red Hat Developers program, which provides 16 | tools, resources, and support for developers who wish to utilize Red Hat 17 | solutions and products to create applications, both locally and in the 18 | cloud. For additional information and to register to become a part of 19 | the program, visit http://developers.redhat.com[developers.redhat.com]. 20 | 21 | [[installation-instructions]] 22 | == Installation Instructions 23 | 24 | Detailed installation instructions for setting up Red Hat CDK on each of 25 | the supported platforms (Microsoft Windows, Mac OS X, and Linux) are 26 | available in the 27 | https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/container-development-kit-installation-guide/[CDK 28 | Installation Guide] 29 | 30 | [[getting-started]] 31 | == Getting Started 32 | 33 | The 34 | https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-container-development-kit/[Getting 35 | Started Guide] describes the individual components that form Red Hat 36 | CDK, followed by instructions on how to obtain, install, and configure 37 | the components, so that you can start using the resulting environment to 38 | interact with containers and develop containerized applications. 39 | 40 | An additional document, the Container Development Guide, will be 41 | published with The GA release of the CDK. This guide contains practical 42 | usage examples, including advanced topics such as developing 43 | multi-container applications and container orchestration using 44 | Kubernetes or OpenShift. 45 | 46 | [[updated-releases]] 47 | == Updated Releases 48 | 49 | Updated releases of the CDK will be available to download from Red Hat 50 | Developer portal, http://developers.redhat.com under Technologies. 51 | Select http://developers.redhat.com/products/cdk/download/[Red Hat 52 | Container Development Kit] from the list of product variants. 53 | 54 | [[feedback-and-questions]] 55 | == Feedback and Questions 56 | 57 | Please join the container-tools@redhat.com mailing list to ask questions 58 | and provide feedback. 59 | -------------------------------------------------------------------------------- /components/centos/centos-openshift-setup/README.adoc: -------------------------------------------------------------------------------- 1 | = Vagrantfile: OpenShift Origin 2 | :toc: 3 | 4 | This Vagrantfile: 5 | 6 | * Sets up ADB for development with OpenShift 7 | * Sets up private networking that is used to expose various services to 8 | the host 9 | * Provisions an instance of http://www.openshift.org//[OpenShift Origin] 10 | 11 | If you are interested in the process used in the Vagrantfile to setup 12 | OpenShift, please read the comments at the top of the file. 13 | 14 | The Vagrantfile changes after ADB 1.6.0 are not backward compatible. So 15 | if you are using ADB prior to 1.7.0, you can use the 16 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/v1.6.0/components/centos/centos-openshift-setup/Vagrantfile[old Vagrantfile]. 17 | 18 | [[quickstart]] 19 | == Quickstart 20 | 21 | . Get the latest ADB box and add it to vagrant as described in the 22 | link:../../../docs/installing.adoc[Installing Atomic Developer Bundle]. 23 | 24 | . Create a directory for the Vagrant Box. 25 | + 26 | ---- 27 | $ mkdir directory && cd directory 28 | ---- 29 | 30 | . Download the Vagrantfile. 31 | + 32 | ---- 33 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-openshift-setup/Vagrantfile > Vagrantfile 34 | ---- 35 | + 36 | [NOTE] 37 | ==== 38 | * The ADB OpenShift Vagrant Box IP defaults to `10.1.2.2`. If you want a 39 | different IP then change the `PUBLIC_ADDRESS` variable in the 40 | Vagrantfile. 41 | * If you want to use the latest OpenShift Origin image, then you need to 42 | change the `IMAGE_TAG` variable in the Vagrantfile, to `latest`. 43 | Alternatively, you can specify the value based on the 44 | https://hub.docker.com/r/openshift/origin/tags/[OpenShift Origin 45 | version] you need, for the variable. For instance, `IMAGE_TAG="v1.2.1"` 46 | ==== 47 | 48 | . Start the Vagrant Box. 49 | + 50 | ---- 51 | $ vagrant up 52 | ---- 53 | 54 | . Proceed with using ADB as described in link:../../../docs/using.adoc[Using Atomic Developer Bundle]. 55 | 56 | [additiona-openshit-config] 57 | == Additional configuration for OpenShift 58 | 59 | If you plan to use OpenShift from the host, you may wish to download 60 | `oc` for your platform from an 61 | https://github.com/openshift/origin/releases[OpenShift Origin Release]. 62 | 63 | You may wish to verify that OpenShift is setup using the `oc` CLI as 64 | follows: 65 | 66 | . Check OpenShift status using `oc`. 67 | + 68 | ---- 69 | $ oc status 70 | ---- 71 | 72 | . Check available templates. 73 | + 74 | ---- 75 | $ oc get templates -n openshift 76 | ---- 77 | 78 | . Deploy an application using available templates. 79 | + 80 | ---- 81 | $ oc new-app nodejs-example 82 | ---- 83 | 84 | . Get route information of different deployed apps. 85 | + 86 | ---- 87 | $ oc get routes 88 | ---- 89 | -------------------------------------------------------------------------------- /components/centos/centos-docker-base-setup/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | BOX_NAME = 'projectatomic/adb' 5 | 6 | REQUIRED_PLUGINS = %w(vagrant-service-manager vagrant-sshfs) 7 | errors = [] 8 | 9 | def message(name) 10 | "#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it." 11 | end 12 | # Validate and collect error message if plugin is not installed 13 | REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) } 14 | unless errors.empty? 15 | msg = errors.size > 1 ? "Errors: \n* #{errors.join("\n* ")}" : "Error: #{errors.first}" 16 | fail Vagrant::Errors::VagrantError.new, msg 17 | end 18 | 19 | Vagrant.configure(2) do |config| 20 | # Use environment variable BOX or default 'projectatomic/adb' 21 | config.vm.box = (ENV.key?('BOX') ? (ENV['BOX'].empty? ? BOX_NAME : ENV['BOX']) : BOX_NAME) 22 | 23 | # Setup a DHCP based private network 24 | config.vm.network "private_network", type: "dhcp" 25 | 26 | config.vm.provider "libvirt" do |libvirt, override| 27 | libvirt.driver = "kvm" 28 | libvirt.memory = 1024 29 | libvirt.cpus = 2 30 | libvirt.suspend_mode = "managedsave" 31 | end 32 | 33 | config.vm.provider "virtualbox" do |vbox, override| 34 | vbox.memory = 1024 35 | vbox.cpus = 2 36 | 37 | # Enable use of more than one virtual CPU in a virtual machine. 38 | vbox.customize ["modifyvm", :id, "--ioapic", "on"] 39 | end 40 | 41 | config.vm.provider "openstack" do |os| 42 | # Specify OpenStack authentication information 43 | os.openstack_auth_url = ENV['OS_AUTH_URL'] 44 | os.tenant_name = ENV['OS_TENANT_NAME'] 45 | os.username = ENV['OS_USERNAME'] 46 | os.password = ENV['OS_PASSWORD'] 47 | 48 | # Specify instance information 49 | os.server_name = ENV['OS_INSTANCE'] 50 | os.flavor = ENV['OS_FLAVOR'] 51 | os.image = ENV['OS_IMAGE'] 52 | os.floating_ip_pool = ENV['OS_FLOATING_IP_POOL'] 53 | 54 | os.security_groups = ['default', ENV['OS_SECURITY_GROUP']] 55 | os.keypair_name = ENV['OS_KEYPAIR_NAME'] 56 | config.ssh.private_key_path = ENV['OS_PRIVATE_KEYPATH'] 57 | config.ssh.username = 'vagrant' 58 | end 59 | 60 | config.vm.synced_folder '.', '/vagrant', disabled: true 61 | if Vagrant::Util::Platform.windows? 62 | target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')} 63 | config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 64 | else 65 | config.vm.synced_folder ENV['HOME'], ENV['HOME'], type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 66 | end 67 | config.vm.provision "shell", inline: <<-SHELL 68 | sudo setsebool -P virt_sandbox_use_fusefs 1 69 | SHELL 70 | end 71 | -------------------------------------------------------------------------------- /components/centos/centos-k8s-singlenode-setup/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | BOX_NAME = 'projectatomic/adb' 5 | 6 | REQUIRED_PLUGINS = %w(vagrant-service-manager vagrant-sshfs) 7 | errors = [] 8 | 9 | def message(name) 10 | "#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it." 11 | end 12 | # Validate and collect error message if plugin is not installed 13 | REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) } 14 | unless errors.empty? 15 | msg = errors.size > 1 ? "Errors: \n* #{errors.join("\n* ")}" : "Error: #{errors.first}" 16 | fail Vagrant::Errors::VagrantError.new, msg 17 | end 18 | 19 | # Vagrantfile for single node k8s setup 20 | Vagrant.configure(2) do |config| 21 | # Use environment variable BOX or default 'projectatomic/adb' 22 | config.vm.box = (ENV.key?('BOX') ? (ENV['BOX'].empty? ? BOX_NAME : ENV['BOX']) : BOX_NAME) 23 | 24 | config.vm.provider "libvirt" do |libvirt, override| 25 | libvirt.driver = "kvm" 26 | libvirt.memory = 1024 27 | libvirt.cpus = 2 28 | libvirt.suspend_mode = "managedsave" 29 | end 30 | 31 | config.vm.provider "virtualbox" do |vbox, override| 32 | vbox.memory = 1024 33 | vbox.cpus = 2 34 | 35 | # Enable use of more than one virtual CPU in a virtual machine. 36 | vbox.customize ["modifyvm", :id, "--ioapic", "on"] 37 | end 38 | 39 | # Setup a DHCP based private network 40 | config.vm.network "private_network", type: "dhcp" 41 | 42 | config.vm.provider "openstack" do |os| 43 | # Specify OpenStack authentication information 44 | os.openstack_auth_url = ENV['OS_AUTH_URL'] 45 | os.tenant_name = ENV['OS_TENANT_NAME'] 46 | os.username = ENV['OS_USERNAME'] 47 | os.password = ENV['OS_PASSWORD'] 48 | 49 | # Specify instance information 50 | os.server_name = ENV['OS_INSTANCE'] 51 | os.flavor = ENV['OS_FLAVOR'] 52 | os.image = ENV['OS_IMAGE'] 53 | os.floating_ip_pool = ENV['OS_FLOATING_IP_POOL'] 54 | 55 | os.security_groups = ['default', ENV['OS_SECURITY_GROUP']] 56 | os.keypair_name = ENV['OS_KEYPAIR_NAME'] 57 | config.ssh.private_key_path = ENV['OS_PRIVATE_KEYPATH'] 58 | config.ssh.username = 'vagrant' 59 | end 60 | 61 | # Proxy Information from environment 62 | PROXY = (ENV['PROXY'] || '') 63 | PROXY_USER = (ENV['PROXY_USER'] || '') 64 | PROXY_PASSWORD = (ENV['PROXY_PASSWORD'] || '') 65 | 66 | config.vm.synced_folder '.', '/vagrant', disabled: true 67 | if Vagrant::Util::Platform.windows? 68 | target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')} 69 | config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 70 | else 71 | config.vm.synced_folder ENV['HOME'], ENV['HOME'], type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 72 | end 73 | config.vm.provision "shell", inline: <<-SHELL 74 | sudo setsebool -P virt_sandbox_use_fusefs 1 75 | SHELL 76 | 77 | # Explicitly enable and start kubernetes 78 | config.vm.provision "shell", run: "always", inline: <<-SHELL 79 | PROXY=#{PROXY} PROXY_USER=#{PROXY_USER} PROXY_PASSWORD=#{PROXY_PASSWORD} /usr/bin/sccli kubernetes 80 | SHELL 81 | end 82 | -------------------------------------------------------------------------------- /components/rhel/misc/rhel-k8s-singlenode-setup/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | BOX_NAME = 'cdkv2' 4 | 5 | REQUIRED_PLUGINS = %w(vagrant-service-manager vagrant-registration vagrant-sshfs) 6 | errors = [] 7 | 8 | # Initialize proxy variables 9 | proxy = proxy_user = proxy_password = '' 10 | 11 | def message(name) 12 | "#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it." 13 | end 14 | # Validate and collect error message if plugin is not installed 15 | REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) } 16 | unless errors.empty? 17 | msg = errors.size > 1 ? "Errors: \n* #{errors.join("\n* ")}" : "Error: #{errors.first}" 18 | fail Vagrant::Errors::VagrantError.new, msg 19 | end 20 | 21 | # Vagrantfile for single node k8s setup 22 | Vagrant.configure(2) do |config| 23 | config.vm.box = if ENV.key?('BOX') 24 | ENV['BOX'].empty? ? BOX_NAME : ENV['BOX'] 25 | else 26 | BOX_NAME 27 | end 28 | 29 | config.vm.provider "libvirt" do |libvirt, override| 30 | libvirt.driver = "kvm" 31 | libvirt.memory = 1024 32 | libvirt.cpus = 2 33 | libvirt.suspend_mode = "managedsave" 34 | end 35 | 36 | config.vm.provider "virtualbox" do |vbox, override| 37 | vbox.memory = 1024 38 | vbox.cpus = 2 39 | 40 | # Enable use of more than one virtual CPU in a virtual machine. 41 | vbox.customize ["modifyvm", :id, "--ioapic", "on"] 42 | end 43 | 44 | config.vm.provider "hyperv" do |hyperv, override| 45 | hyperv.memory = 1024 46 | hyperv.cpus = 2 47 | end 48 | 49 | config.vm.network "private_network", type: "dhcp" 50 | 51 | if ENV.has_key?('SUB_USERNAME') && ENV.has_key?('SUB_PASSWORD') 52 | config.registration.username = ENV['SUB_USERNAME'] 53 | config.registration.password = ENV['SUB_PASSWORD'] 54 | end 55 | 56 | # Proxy Information from environment 57 | if ENV.key?('PROXY') 58 | config.registration.proxy = proxy = ENV['PROXY'] 59 | config.registration.proxyUser = proxy_user = ENV['PROXY_USER'] if ENV.key?('PROXY_USER') 60 | config.registration.proxyPassword = proxy_password = ENV['PROXY_PASSWORD'] if ENV.key?('PROXY_PASSWORD') 61 | end 62 | 63 | # vagrant-sshfs 64 | config.vm.synced_folder '.', '/vagrant', disabled: true 65 | if Vagrant::Util::Platform.windows? 66 | target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')} 67 | config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 68 | else 69 | config.vm.synced_folder ENV['HOME'], ENV['HOME'], type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 70 | end 71 | 72 | config.vm.provision "shell", inline: <<-SHELL 73 | sudo setsebool -P virt_sandbox_use_fusefs 1 74 | SHELL 75 | 76 | # prevent the automatic start of openshift via service-manager by just enabling Docker 77 | config.servicemanager.services = "docker" 78 | 79 | # Explicitly enable and start kubernetes 80 | config.vm.provision "shell", run: "always", inline: <<-SHELL 81 | PROXY=#{proxy} PROXY_USER=#{proxy_user} PROXY_PASSWORD=#{proxy_password} /usr/bin/sccli kubernetes 82 | echo "kubernetes single node cluster setup successfully" 83 | SHELL 84 | end 85 | -------------------------------------------------------------------------------- /components/rhel/rhel-ose/README.adoc: -------------------------------------------------------------------------------- 1 | = Vagrantfile: OpenShift Container Platform 2 | :toc: 3 | :toc-placement!: 4 | 5 | This Vagrantfile sets up the CDK for development with OpenShift. This 6 | file also sets up private networking that will be used to expose various 7 | services to the host. This Vagrantfile also provisions an instance of 8 | https://www.openshift.com/container-platform/whats-new.html[OpenShift 9 | Container Platform]. 10 | 11 | If you are interested in the process used in the Vagranfile to setup 12 | OpenShift, please read the comments at the top of the file. 13 | 14 | ''' 15 | toc::[] 16 | ''' 17 | 18 | [[quickstart]] 19 | == Quickstart 20 | 21 | . Create a directory for the Vagrant Box. 22 | + 23 | ---- 24 | $ mkdir directory && cd directory 25 | ---- 26 | 27 | . Get the latest CDK box using Developer Subscription. You can download 28 | the CDK and find further information about CDK 29 | http://developers.redhat.com/products/cdk/overview/[here]. For detailed instructions on how to install CDK refer to the 30 | https://access.redhat.com/documentation/en/red-hat-container-development-kit/2.3/paged/installation-guide[CDK Installation Guide]. 31 | 32 | . Add the box to Vagrant with the following command: 33 | + 34 | ---- 35 | $ vagrant box add --name cdkv2 /rhel-cdk-kubernetes-7.2-*.x86_64.vagrant-libvirt.box 36 | ---- 37 | 38 | + 39 | [NOTE] 40 | ==== 41 | If you want to use a customized name for the box, you need to: 42 | 43 | * Specify your `` in place of `cdkv2` as in: 44 | ---- 45 | $ vagrant box add --name /rhel-cdk-kubernetes-7.2-*.x86_64.vagrant-libvirt.box 46 | ---- 47 | * Add the `` as the value of the `BOX` environment variable with the following command: 48 | ---- 49 | export BOX= 50 | ---- 51 | ==== 52 | + 53 | 54 | . Download the Vagrantfile. 55 | + 56 | ---- 57 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/rhel/rhel-ose/Vagrantfile > Vagrantfile 58 | ---- 59 | 60 | . Start the Vagrant Box. 61 | + 62 | ---- 63 | $ vagrant up 64 | ---- 65 | 66 | . Proceed with using the CDK box. 67 | 68 | [additiona-openshit-config] 69 | == Additional configuration for OpenShift 70 | 71 | If you plan to use OpenShift from the host, you may wish to download 72 | `oc` for your platform from an 73 | https://access.redhat.com/downloads/content/290[OpenShift Container Platform 74 | Release]. 75 | 76 | You may wish to verify that OpenShift is setup using the `oc` CLI as 77 | follows: 78 | 79 | . Login to OpenShift using `oc`. 80 | + 81 | ---- 82 | $ oc login : 83 | ---- 84 | + 85 | Default configured values: 86 | + 87 | * User: openshift-dev/devel 88 | * Administrator: admin/admin 89 | * IP: 10.1.2.2 90 | * Port: 8443 91 | 92 | . Create a test project to OpenShift using `oc`. 93 | + 94 | ---- 95 | $ oc new-project test 96 | ---- 97 | 98 | . Check OpenShift status using `oc`. 99 | + 100 | ---- 101 | $ oc status 102 | ---- 103 | 104 | . Check available templates. 105 | + 106 | ---- 107 | $ oc get templates -n openshift 108 | ---- 109 | 110 | . Deploy an application using available templates. 111 | + 112 | ---- 113 | $ oc new-app nodejs-example 114 | ---- 115 | 116 | . Get route information of different deployed apps. 117 | + 118 | `$ oc get routes` 119 | -------------------------------------------------------------------------------- /components/rhel/rhel-ose/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | # The private network IP of the VM. You will use this IP to connect to OpenShift. 5 | # This variable is ignored for Hyper-V provider. 6 | BOX_NAME = 'cdkv2' 7 | 8 | PUBLIC_ADDRESS="10.1.2.2" 9 | 10 | #Modify IMAGE_TAG if you need a new OCP version e.g. IMAGE_TAG="v3.3.1.3" 11 | IMAGE_TAG="" 12 | 13 | # Number of virtualized CPUs 14 | VM_CPU = ENV['VM_CPU'] || 2 15 | 16 | # Amount of available RAM 17 | VM_MEMORY = ENV['VM_MEMORY'] || 3072 18 | 19 | # Validate required plugins 20 | REQUIRED_PLUGINS = %w(vagrant-service-manager vagrant-registration vagrant-sshfs) 21 | errors = [] 22 | 23 | # Initialize proxy variables 24 | proxy = proxy_user = proxy_password = '' 25 | 26 | def message(name) 27 | "#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it." 28 | end 29 | # Validate and collect error message if plugin is not installed 30 | REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) } 31 | unless errors.empty? 32 | msg = errors.size > 1 ? "Errors: \n* #{errors.join("\n* ")}" : "Error: #{errors.first}" 33 | fail Vagrant::Errors::VagrantError.new, msg 34 | end 35 | 36 | Vagrant.configure(2) do |config| 37 | config.vm.box = if ENV.key?('BOX') 38 | ENV['BOX'].empty? ? BOX_NAME : ENV['BOX'] 39 | else 40 | BOX_NAME 41 | end 42 | 43 | config.vm.provider "virtualbox" do |v, override| 44 | v.memory = VM_MEMORY 45 | v.cpus = VM_CPU 46 | v.customize ["modifyvm", :id, "--ioapic", "on"] 47 | v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] 48 | end 49 | 50 | config.vm.provider "libvirt" do |v, override| 51 | v.memory = VM_MEMORY 52 | v.cpus = VM_CPU 53 | v.driver = "kvm" 54 | v.suspend_mode = "managedsave" 55 | end 56 | 57 | config.vm.provider "hyperv" do |v, override| 58 | v.memory = VM_MEMORY 59 | v.cpus = VM_CPU 60 | end 61 | 62 | config.vm.network "private_network", ip: "#{PUBLIC_ADDRESS}" 63 | 64 | # vagrant-registration 65 | if ENV.has_key?('SUB_USERNAME') && ENV.has_key?('SUB_PASSWORD') 66 | config.registration.username = ENV['SUB_USERNAME'] 67 | config.registration.password = ENV['SUB_PASSWORD'] 68 | end 69 | 70 | # Proxy Information from environment 71 | if ENV.key?('PROXY') 72 | config.registration.proxy = proxy = ENV['PROXY'] 73 | config.registration.proxyUser = proxy_user = ENV['PROXY_USER'] if ENV.key?('PROXY_USER') 74 | config.registration.proxyPassword = proxy_password = ENV['PROXY_PASSWORD'] if ENV.key?('PROXY_PASSWORD') 75 | end 76 | 77 | # vagrant-sshfs 78 | config.vm.synced_folder '.', '/vagrant', disabled: true 79 | if Vagrant::Util::Platform.windows? 80 | target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')} 81 | config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 82 | else 83 | config.vm.synced_folder ENV['HOME'], ENV['HOME'], type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 84 | end 85 | 86 | config.vm.provision "shell", inline: <<-SHELL 87 | sudo setsebool -P virt_sandbox_use_fusefs 1 88 | SHELL 89 | 90 | # prevent the automatic start of openshift via service-manager by just enabling Docker 91 | config.servicemanager.services = "docker" 92 | 93 | # explicitly enable and start OpenShift 94 | config.vm.provision "shell", run: "always", inline: <<-SHELL 95 | PROXY=#{proxy} PROXY_USER=#{proxy_user} PROXY_PASSWORD=#{proxy_password} IMAGE_TAG=#{IMAGE_TAG} /usr/bin/sccli openshift 96 | SHELL 97 | 98 | config.vm.provision "shell", run: "always", inline: <<-SHELL 99 | #Get the routable IP address of OpenShift 100 | OS_IP=`/opt/adb/openshift/get_ip_address` 101 | echo 102 | echo "Successfully started and provisioned VM with #{VM_CPU} cores and #{VM_MEMORY} MB of memory." 103 | echo "To modify the number of cores and/or available memory set the environment variables" 104 | echo "VM_CPU and/or VM_MEMORY respectively." 105 | echo 106 | echo "You can now access the OpenShift console on: https://${OS_IP}:8443/console" 107 | echo 108 | echo "To download and install OC binary, run:" 109 | echo "vagrant service-manager install-cli openshift" 110 | echo 111 | echo "To use OpenShift CLI, run:" 112 | echo "$ oc login ${OS_IP}:8443" 113 | echo 114 | echo "Configured users are (/):" 115 | echo "openshift-dev/devel" 116 | echo "admin/admin" 117 | echo 118 | echo "If you have the oc client library on your host, you can also login from your host." 119 | echo 120 | SHELL 121 | end 122 | -------------------------------------------------------------------------------- /components/centos/centos-mesos-marathon-singlenode-setup/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | BOX_NAME = 'projectatomic/adb' 5 | 6 | IP_ADDRESS="10.2.2.2" 7 | 8 | REQUIRED_PLUGINS = %w(vagrant-service-manager vagrant-sshfs) 9 | errors = [] 10 | 11 | def message(name) 12 | "#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it." 13 | end 14 | # Validate and collect error message if plugin is not installed 15 | REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) } 16 | unless errors.empty? 17 | msg = errors.size > 1 ? "Errors: \n* #{errors.join("\n* ")}" : "Error: #{errors.first}" 18 | fail Vagrant::Errors::VagrantError.new, msg 19 | end 20 | 21 | Vagrant.configure("2") do |config| 22 | # Use environment variable BOX or default 'projectatomic/adb' 23 | config.vm.box = (ENV.key?('BOX') ? (ENV['BOX'].empty? ? BOX_NAME : ENV['BOX']) : BOX_NAME) 24 | 25 | config.vm.provider "virtualbox" do |v, override| 26 | v.memory = 2048 27 | v.cpus = 2 28 | end 29 | 30 | config.vm.provider "libvirt" do |v, override| 31 | v.driver = "kvm" 32 | v.memory = 2048 33 | v.cpus = 2 34 | v.suspend_mode = "managedsave" 35 | end 36 | 37 | config.vm.provider "openstack" do |os| 38 | # Specify OpenStack authentication information 39 | os.openstack_auth_url = ENV['OS_AUTH_URL'] 40 | os.tenant_name = ENV['OS_TENANT_NAME'] 41 | os.username = ENV['OS_USERNAME'] 42 | os.password = ENV['OS_PASSWORD'] 43 | 44 | # Specify instance information 45 | os.server_name = ENV['OS_INSTANCE'] 46 | os.flavor = ENV['OS_FLAVOR'] 47 | os.image = ENV['OS_IMAGE'] 48 | os.floating_ip_pool = ENV['OS_FLOATING_IP_POOL'] 49 | 50 | os.security_groups = ['default', ENV['OS_SECURITY_GROUP']] 51 | os.keypair_name = ENV['OS_KEYPAIR_NAME'] 52 | config.ssh.private_key_path = ENV['OS_PRIVATE_KEYPATH'] 53 | config.ssh.username = 'vagrant' 54 | end 55 | 56 | config.vm.synced_folder '.', '/vagrant', disabled: true 57 | if Vagrant::Util::Platform.windows? 58 | target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')} 59 | config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 60 | else 61 | config.vm.synced_folder ENV['HOME'], ENV['HOME'], type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 62 | end 63 | config.vm.provision "shell", inline: <<-SHELL 64 | sudo setsebool -P virt_sandbox_use_fusefs 1 65 | SHELL 66 | 67 | ANSIBLE_PLAYBOOK = <<-EOF 68 | - hosts: localhost 69 | sudo: yes 70 | connection: local 71 | tasks: 72 | 73 | # Packages start services, this is why we need to configure it before install 74 | - name: Create dir for Mesos Slave config 75 | file: path=/etc/{{ item }} state=directory 76 | with_items: 77 | - marathon/conf 78 | - mesos-slave 79 | 80 | - name: Configure IP address for mesos-slave 81 | copy: 82 | content: '{{ ip_address }}' 83 | dest: /etc/mesos-slave/ip 84 | 85 | - name: Configure Port Ranges for mesos-slave 86 | copy: 87 | content: 'ports:[1024-32000]' 88 | dest: /etc/mesos-slave/resources 89 | 90 | - name: Increase timeout to account for docker pull delay 91 | copy: 92 | content: '5mins' 93 | dest: /etc/mesos-slave/executor_registration_timeout 94 | 95 | - name: Add docker containerizer 96 | copy: 97 | content: 'docker,mesos' 98 | dest: /etc/mesos-slave/containerizers 99 | 100 | - name: Configure IP address for Marathon 101 | copy: 102 | content: '{{ ip_address }}' 103 | dest: /etc/marathon/conf/hostname 104 | 105 | - name: Install Mesosphere repository 106 | yum: name=http://repos.mesosphere.com/el/7/noarch/RPMS/mesosphere-el-repo-7-3.noarch.rpm state=present 107 | 108 | - name: Installing zookeeper, mesos, marathon, docker, git, atomicapp 109 | yum: name={{item}} state=present 110 | with_items: 111 | - mesosphere-zookeeper 112 | - mesos 113 | - marathon 114 | - docker 115 | - git 116 | - atomicapp 117 | 118 | - name: Starting zookeeper, mesos, marathon, docker 119 | service: name={{item}} state=started enabled=yes 120 | with_items: 121 | - zookeeper 122 | - mesos-master 123 | - mesos-slave 124 | - marathon 125 | - docker 126 | EOF 127 | 128 | config.vm.provision "shell", run: "always", inline: <<-SHELL 129 | sudo yum -y install epel-release 130 | sudo yum -y install ansible 131 | sudo ansible-playbook -i localhost, -e ip_address=#{IP_ADDRESS} /dev/stdin <<< "#{ANSIBLE_PLAYBOOK}" 132 | SHELL 133 | 134 | config.vm.network "private_network", ip: "#{IP_ADDRESS}" 135 | end 136 | -------------------------------------------------------------------------------- /components/centos/centos-openshift-setup/Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | BOX_NAME = 'projectatomic/adb' 5 | 6 | # The Docker registry from where we pull the OpenShift Docker image 7 | DOCKER_REGISTRY="docker.io" 8 | 9 | # The name of the OpenShift image available on dockerhub. 10 | IMAGE_NAME="openshift/origin" 11 | # Tag of the OpenShift image available on dockerhub. 12 | IMAGE_TAG="v1.2.0" 13 | 14 | # The top level domain for your VM and the created application routes 15 | TLD = 'adb' 16 | 17 | # The host name of the VM. Needs to have a different TLD due to Kubernetes issue 18 | HOSTNAME = 'adb.vm' 19 | 20 | # Host name for accessing OpenShift 21 | OPENSHIFT_HOSTNAME = "openshift.#{TLD}" 22 | 23 | REQUIRED_PLUGINS = %w(vagrant-service-manager vagrant-sshfs landrush) 24 | errors = [] 25 | 26 | def message(name) 27 | "#{name} plugin is not installed, run `vagrant plugin install #{name}` to install it." 28 | end 29 | # Validate and collect error message if plugin is not installed 30 | REQUIRED_PLUGINS.each { |plugin| errors << message(plugin) unless Vagrant.has_plugin?(plugin) } 31 | unless errors.empty? 32 | msg = errors.size > 1 ? "Errors: \n* #{errors.join("\n* ")}" : "Error: #{errors.first}" 33 | fail Vagrant::Errors::VagrantError.new, msg 34 | end 35 | 36 | # The following steps are executed to provision OpenShift Origin: 37 | # 1. Create a private network and set the Vagrant Box IP to *10.1.2.2*. If you want a different IP then change the **PUBLIC_ADDRESS** variable. 38 | # 2. Pull latest the *openshift/origin* container from docker hub and tag it. 39 | # 3. Provide required configuration details for OpenShift web console and API. 40 | # For More info about Openshift, please refer to `offical documents 41 | # `_. 42 | 43 | Vagrant.configure(2) do |config| 44 | # Use environment variable BOX or default 'projectatomic/adb' 45 | config.vm.box = (ENV.key?('BOX') ? (ENV['BOX'].empty? ? BOX_NAME : ENV['BOX']) : BOX_NAME) 46 | 47 | config.vm.hostname = HOSTNAME 48 | 49 | config.vm.provider "virtualbox" do |v, override| 50 | v.memory = 2048 51 | v.cpus = 2 52 | v.customize ["modifyvm", :id, "--cpus", "2"] 53 | v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] 54 | end 55 | 56 | config.vm.provider "libvirt" do |v, override| 57 | v.driver = "kvm" 58 | v.memory = 2048 59 | v.cpus = 2 60 | v.suspend_mode = "managedsave" 61 | end 62 | 63 | config.vm.provider "openstack" do |os| 64 | # Specify OpenStack authentication information 65 | os.openstack_auth_url = ENV['OS_AUTH_URL'] 66 | os.tenant_name = ENV['OS_TENANT_NAME'] 67 | os.username = ENV['OS_USERNAME'] 68 | os.password = ENV['OS_PASSWORD'] 69 | 70 | # Specify instance information 71 | os.server_name = ENV['OS_INSTANCE'] 72 | os.flavor = ENV['OS_FLAVOR'] 73 | os.image = ENV['OS_IMAGE'] 74 | os.floating_ip_pool = ENV['OS_FLOATING_IP_POOL'] 75 | 76 | os.security_groups = ['default', ENV['OS_SECURITY_GROUP']] 77 | os.keypair_name = ENV['OS_KEYPAIR_NAME'] 78 | config.ssh.private_key_path = ENV['OS_PRIVATE_KEYPATH'] 79 | config.ssh.username = 'vagrant' 80 | end 81 | 82 | # Proxy Information from environment 83 | PROXY = (ENV['PROXY'] || '') 84 | PROXY_USER = (ENV['PROXY_USER'] || '') 85 | PROXY_PASSWORD = (ENV['PROXY_PASSWORD'] || '') 86 | 87 | # vagrant-sshfs 88 | config.vm.synced_folder '.', '/vagrant', disabled: true 89 | if Vagrant::Util::Platform.windows? 90 | target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')} 91 | config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 92 | else 93 | config.vm.synced_folder ENV['HOME'], ENV['HOME'], type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000' 94 | end 95 | config.vm.provision "shell", inline: <<-SHELL 96 | sudo setsebool -P virt_sandbox_use_fusefs 1 97 | SHELL 98 | 99 | # landrush 100 | config.landrush.enabled = true 101 | config.landrush.tld = TLD 102 | config.landrush.host TLD, HOSTNAME 103 | config.landrush.guest_redirect_dns = false 104 | config.vm.provision :shell, inline: <<-SHELL 105 | sed -i.orig -e "s/^ip=.*/ip='#{OPENSHIFT_HOSTNAME}'/g" /opt/adb/openshift/openshift 106 | sed -i.orig -e "s/OPENSHIFT_SUBDOMAIN=.*/OPENSHIFT_SUBDOMAIN='#{TLD}'/g" /etc/sysconfig/openshift_option 107 | SHELL 108 | 109 | config.vm.provision "shell", run: "always", inline: <<-SHELL 110 | PROXY=#{PROXY} PROXY_USER=#{PROXY_USER} PROXY_PASSWORD=#{PROXY_PASSWORD} \ 111 | DOCKER_REGISTRY=#{DOCKER_REGISTRY} IMAGE_TAG=#{IMAGE_TAG} IMAGE_NAME=#{IMAGE_NAME} /usr/bin/sccli openshift 112 | SHELL 113 | 114 | config.vm.provision "shell", run: "always", privileged: false, inline: <<-SHELL 115 | echo "You can now access OpenShift console on: https://#{OPENSHIFT_HOSTNAME}:8443/console" 116 | echo 117 | echo "Configured basic user: openshift-dev, Password: devel" 118 | echo 119 | echo "Configured cluster admin user: admin, Password: admin" 120 | echo 121 | echo "To download and install OC binary, run:" 122 | echo "vagrant service-manager install-cli openshift" 123 | echo 124 | echo "To use OpenShift CLI, run:" 125 | echo "$ oc login #{OPENSHIFT_HOSTNAME}:8443" 126 | echo 127 | echo "To browse the OpenShift API documentation, follow this link:" 128 | echo "http://openshift3swagger-claytondev.rhcloud.com" 129 | echo 130 | echo "Then enter this URL:" 131 | echo https://#{OPENSHIFT_HOSTNAME}:8443/swaggerapi/oapi/v1 132 | echo "." 133 | SHELL 134 | end 135 | -------------------------------------------------------------------------------- /docs/troubleshooting.adoc: -------------------------------------------------------------------------------- 1 | = Troubleshooting 2 | :toc: 3 | :toc-placement!: 4 | 5 | Use this document to identify and resolve basic ADB issues that you encounter. 6 | 7 | ''' 8 | toc::[] 9 | ''' 10 | [[install-update]] 11 | == Installation and Update 12 | 13 | This section contains issues related to installing, configuring, and updating ADB. 14 | 15 | === On a Windows machine, Vagrant fails to initialize after updating to the latest ADB version 16 | 17 | In addition to the standard link:updating.adoc[steps to update ADB], you need to run the 18 | following command to delete the .vagrant.d directory: 19 | 20 | ---- 21 | # rm -rf C:/Users//.vagrant.d/ 22 | ---- 23 | 24 | [[landrrush]] 25 | == Landrush 26 | 27 | https://github.com/vagrant-landrush/landrush/blob/master/README.md[Landrush] is a 28 | platform-agnostic DNS server used by ADB to provide name based access to services, 29 | such as Openshift, running in ADB. 30 | 31 | In ADB, you use Landrush as a vagrant plugin. Refer to the 32 | link:installing.adoc[Installation document] for details on downloading 33 | Landrush. 34 | 35 | 36 | === I am unable to access the Internet or override the Landrush upstream DNS 37 | 38 | By default, Landrush uses Google's DNS server, with the IP address 39 | 8.8.8.8, to resolve DNS queries that are not for Landrush managed 40 | hostnames. If your network blocks access to the Google DNS servers, due 41 | to firewalls, VPN and so on, you need to set a custom upstream DNS 42 | server. This server is configured with the `config.landrush.upstream` 43 | option. 44 | 45 | For example, to use 10.25.35.4 as a DNS server, add this line to your 46 | `Vagrantfile`: 47 | 48 | `config.landrush.upstream '10.25.35.4'` 49 | 50 | You will need to check your network configuration on the host or ask your 51 | network administrator for the right DNS server address to use. 52 | 53 | For further details, refer to the *Guest is unable to access the Internet* and 54 | the *Unmatched Queries* sections in the https://github.com/vagrant-landrush/landrush/blob/master/README.md[Landrush documentation]. 55 | 56 | 57 | === I cannot access the OpenShift console from my browser 58 | 59 | Landrush enables you to access services running in ADB, such as 60 | OpenShift, from the browser. When you start ADB, it provides Landrush 61 | with the IP address and the hostname it wishes to use. Landrush always 62 | uses the latest information available. Occasionally, using multiple 63 | copies of ADB on the same host or other problems with ADB can cause 64 | Landrush to store stale data in the `hosts.json` file, which prevents 65 | access to the OpenShift console. + 66 | 67 | There are two ways you can remove these stale entries, you can do the 68 | following: 69 | 70 | . Use `vagrant landrush ls` to check the existing domains for Landrush. 71 | . Use `vagrant landrush del ` to delete the unwanted 72 | domains. 73 | 74 | Alternatively, you can: 75 | 76 | . Run `vagrant destroy` to destroy the ADB vagrant box. 77 | + 78 | WARNING: Using vagrant destroy will destroy any data you stored in the Vagrant box. 79 | You will not be able to restart this instance and will have to create a new one using `vagrant up`. 80 | 81 | . Delete extra entries from the `hosts.json` file : 82 | 83 | * Windows users will find this file in: `C:/Users//.vagrant.d/data/landrush/hosts.json` 84 | * Linux and OS X users will find this file in: `~/.vagrant.d/data/landrush/hosts.json` 85 | + 86 | The `hosts.json` file should now have an empty list of hostnames, 87 | represented by a file containing only curly braces `{}`. 88 | 89 | To verify that your hostname has been correctly registered with Landrush, 90 | run `vagrant up`. The expected output is: 91 | 92 | .... 93 | $ vagrant.exe landrush ls 94 | cdk.vm 172.28.128.3 95 | 3.128.28.172.in-addr.arpa cdk.vm 96 | cdk cdk.vm 97 | .... 98 | 99 | 100 | === OpenShift Web console fails to reconnect when you switch networks or reconnect to VPN 101 | 102 | Linux users are most likely to encounter this problem because 103 | **NetworkManager** overwrites Landrush’s entry in the `/etc/resolve.conf` file, on enterprise Linux. The **NetworkManager** controls the 104 | `/etc/resolve.conf` file. When you connect to a VPN network or switch 105 | networks (for example, from a work network to a home network), 106 | **NetworkManager** overwrites this file and the Landrush entry is deleted. 107 | 108 | To resolve this you need to add the following lines, at the top of the `/etc/resolv.conf` file: 109 | 110 | .... 111 | # Added by landrush, a vagrant plugin 112 | nameserver 127.0.0.1 113 | .... 114 | 115 | 116 | === I use libvirt and am unable to connect to the OpenShift console or the other applications running in ADB, or I use Libvirt but want to use VirtualBox for ADB 117 | 118 | Linux users may be affected by this issue. If you use libvirt provider, 119 | `libvirtd` uses `dnsmasq` as part of it's internal DNS resolution for 120 | virtual machines. When Landrush starts, it expects to be able to reset 121 | the system `dnsmasq`. The libvirt started `dnsmasq` blocks this action. 122 | Therefore, it is important that the system `dnsmasq` be started before 123 | libvirt. 124 | 125 | Perform these steps to resolve this issue: 126 | 127 | NOTE: The following steps must be run as root. 128 | 129 | . Stop the libvirt and dnsmasq process: 130 | + 131 | .... 132 | $ systemctl stop libvirtd 133 | $ systemctl stop dnsmasq 134 | .... 135 | 136 | . Kill the dnsmasq process running on the host: 137 | + 138 | .... 139 | $ ps aux | grep dnsmasq 140 | $ kill -9 141 | $ ps aux | grep dnsmasq 142 | .... 143 | + 144 | Or you could: 145 | + 146 | .... 147 | $ killall -9 dnsmasq 148 | .... 149 | 150 | . Start the dnsmasq process first and then start the libvirt process. 151 | + 152 | .... 153 | $ systemctl start dnsmasq 154 | $ systemctl status dnsmasq 155 | $ systemctl start libvirtd 156 | $ systemctl status libvirtd 157 | .... 158 | + 159 | [NOTE] 160 | ==== 161 | If you wish to use the VirtualBox provider, start the dnsmasq process 162 | only and skip the start libvirt process: 163 | .... 164 | $ systemctl start dnsmasq 165 | $ systemctl status dnsmasq 166 | .... 167 | ==== 168 | 169 | . Now, `vagrant up`. 170 | + 171 | .... 172 | $ vagrant up 173 | .... 174 | -------------------------------------------------------------------------------- /docs/installing.adoc: -------------------------------------------------------------------------------- 1 | = Installing Atomic Developer Bundle 2 | :toc: 3 | :toc-placement!: 4 | 5 | This document describes how to install ADB and required dependencies. 6 | 7 | ''' 8 | toc::[] 9 | ''' 10 | 11 | [[install-virt-provider]] 12 | == Step 1. Install a virtualization provider 13 | 14 | Two virtualization providers have been tested with ADB; VirtualBox and 15 | Libvirt. 16 | 17 | The following virtualization providers are suggested for the respective 18 | operating systems: 19 | 20 | === Microsoft Windows and Mac OS X 21 | 22 | The suggested virtualization provider for Microsoft Windows and Mac OS X 23 | is https://www.virtualbox.org[VirtualBox]. Installation instructions are 24 | available https://www.virtualbox.org/manual/UserManual.html[online]. 25 | While the latest stable shipping release should work, the majority of 26 | testing has been done with version 5.0.0 on Mac OS X and 5.0.8 on 27 | Microsoft Windows. 28 | 29 | === Fedora 30 | 31 | Two different virtualization providers are supported on Linux; 32 | https://www.virtualbox.org[VirtualBox] and http://libvirt.org/[libvirt]. 33 | The choice as to which to use should be driven by your preferences and 34 | environmental concerns and is outside of the scope of this document. 35 | Both will work equally well in their default configuration. You may wish 36 | to read the section on file synchronization in the 37 | link:using.adoc[Using ADB documentation] when making this decision. 38 | 39 | * VirtualBox installation instructions are available 40 | https://www.virtualbox.org/manual/ch02.html#startingvboxonlinux[online 41 | at the VirtualBox website]. Testing has been done with versions 4.3.34 42 | and 5.0.0. 43 | + 44 | A summary of the installation is listed below: 45 | + 46 | .... 47 | $ sudo dnf -y install dkms 48 | $ curl -O http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo 49 | $ sudo mv virtualbox.repo /etc/yum.repos.d/ 50 | $ sudo dnf -y install VirtualBox-4.3 51 | $ sudo /etc/init.d/vboxdrv setup 52 | .... 53 | + 54 | While the latest stable release should work, the majority of testing has 55 | been done with version 4.3.30. 56 | 57 | * Installing libvirt dependencies can be skipped as they are 58 | automatically installed together with the `vagrant-libvirt` package. 59 | Testing has been done with libvirt version 1.2.18 and vagrant-libvirt 60 | version 0.0.32. 61 | 62 | === CentOS 63 | 64 | Two different virtualization providers are supported on Linux; 65 | https://www.virtualbox.org[VirtualBox] and http://libvirt.org/[libvirt]. 66 | The choice as to which to use should be driven by your preferences and 67 | environmental concerns and is outside of the scope of this document. 68 | Both will work equally well in their default configuration. You may wish 69 | to read the section onfile synchronization in the 70 | link:using.adoc[Using ADB documentation] when making this decision. 71 | 72 | * VirtualBox installation instructions are available 73 | https://www.virtualbox.org/manual/ch02.html#startingvboxonlinux[online 74 | at the VirtualBox website]. 75 | https://wiki.centos.org/HowTos/Virtualization/VirtualBox[CentOS specific 76 | instructions] are also available. 77 | + 78 | While the latest stable release should work, the majority of testing has 79 | been done with version 4.3.30. 80 | + 81 | A summary of the installation is listed below: 82 | + 83 | .... 84 | $ sudo yum -y install epel-release 85 | $ sudo yum -y install dkms 86 | $ curl -O http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo 87 | $ sudo mv virtualbox.repo /etc/yum.repos.d/ 88 | $ sudo yum -y install VirtualBox-4.3 89 | $ sudo /etc/init.d/vboxdrv setup 90 | .... 91 | 92 | * Installing libvirt dependencies can be skipped as they are 93 | automatically installed together with the CentOS software collections 94 | build. 95 | 96 | [[install-vagrant]] 97 | == Step 2. Install Vagrant 98 | 99 | This section includes installation instructions according to your operating system. 100 | 101 | === Microsoft Windows 102 | 103 | . Follow the directions at 104 | https://docs.vagrantup.com/v2/installation/index.html[vagrantup.com]. 105 | Testing has been done with version 1.7.4. 106 | 107 | . Install an `ssh` client. Two good options are: 108 | * https://cygwin.com/install.html[Cygwin] 109 | * http://www.mingw.org/[mingw] 110 | 111 | NOTE: Putty is not recommended as it doesn't currently interface with Vagrant. 112 | 113 | === Mac OS X 114 | 115 | Follow the directions at 116 | https://docs.vagrantup.com/v2/installation/index.html[vagrantup.com]. 117 | Testing has been done with version 1.7.4. 118 | 119 | === Fedora 23/24 120 | 121 | Testing has been done with version 1.7.2. 122 | 123 | * To install Vagrant with VirtualBox in Fedora 23/24: 124 | + 125 | .... 126 | $ sudo dnf install -y vagrant 127 | .... 128 | * To install Vagrant with libvirt in Fedora 23/24: 129 | + 130 | .... 131 | $ sudo dnf -y install vagrant-libvirt 132 | 133 | # Start libvirtd 134 | $ sudo systemctl start libvirtd 135 | 136 | # Set libvirtd to start automatically on system boot 137 | $ sudo systemctl enable libvirtd 138 | .... 139 | + 140 | This would install both Vagrant and Libvirt. 141 | 142 | === CentOS 143 | 144 | Vagrant packages are not available directly in CentOS core. However, 145 | they are available through official CentOS 146 | http://softwarecollections.org[Software Collections] builds. 147 | 148 | Run the following commands to get Vagrant in CentOS: 149 | 150 | ---- 151 | $ sudo yum -y install centos-release-scl 152 | $ sudo yum -y install sclo-vagrant1 153 | $ sudo scl enable sclo-vagrant1 bash 154 | ---- 155 | 156 | To add libvirt support, also run the following commands: 157 | 158 | ---- 159 | # Start libvirtd 160 | $ sudo systemctl start libvirtd 161 | 162 | # Set libvirtd to start automatically on system boot 163 | $ sudo systemctl enable libvirtd 164 | ---- 165 | 166 | [[install-dependencies]] 167 | == Step 3. Install additional dependencies 168 | 169 | For some operating systems, you might need to install additional 170 | dependencies before you install the Vagrant plugins. 171 | 172 | === Fedora 23/24 173 | 174 | Run the following commands to install the additional dependencies: 175 | 176 | ---- 177 | $ sudo dnf install @'Development Tools' 178 | $ sudo dnf install rpm-build zlib-devel ruby-devel gcc-c++ 179 | ---- 180 | 181 | [[install-vagrant-plugins]] 182 | == Step 4. Install Vagrant plugins 183 | 184 | Run the following commands to install the 185 | https://github.com/projectatomic/vagrant-service-manager[vagrant-service-manager], 186 | https://github.com/dustymabe/vagrant-sshfs[vagrant-sshfs], and 187 | https://github.com/vagrant-landrush/landrush[landrush] plugins: 188 | 189 | ---- 190 | $ vagrant plugin install vagrant-service-manager 191 | $ vagrant plugin install vagrant-sshfs 192 | $ vagrant plugin install landrush 193 | ---- 194 | 195 | [[download-adb]] 196 | == Step 5. Download ADB 197 | 198 | There are two ways to download ADB. 199 | 200 | === Download preconfigured Vagrantfiles 201 | 202 | The ADB project provides customized Vagrantfiles, which will download 203 | ADB and automatically set up provider-specific container development 204 | environments. They are listed below and more details are available in 205 | their respective Readmes. 206 | 207 | To download ADB and set up a provider-specific container development 208 | environment: 209 | 210 | . Create a directory for the Vagrant box 211 | + 212 | `$ mkdir directory && cd directory` 213 | . Download any of the following vagrantfiles, to configure the 214 | development environment you need. 215 | * To configure a 216 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-docker-base-setup/Vagrantfile[Docker] 217 | specific container development environment use: 218 | + 219 | ---- 220 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-docker-base-setup/Vagrantfile > Vagrantfile 221 | ---- 222 | + 223 | Refer: 224 | link:../components/centos/centos-docker-base-setup/README.adoc[README] 225 | * To configure a 226 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-k8s-singlenode-setup/Vagrantfile[Kubernetes] 227 | specific container development environment use: 228 | + 229 | ---- 230 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-k8s-singlenode-setup/Vagrantfile > Vagrantfile 231 | ---- 232 | + 233 | Refer: 234 | link:../components/centos/centos-k8s-singlenode-setup/README.adoc[README] 235 | * To configure an https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-openshift-setup/Vagrantfile[OpenShift Origin] specific container development environment 236 | use: 237 | + 238 | ---- 239 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-openshift-setup/Vagrantfile > Vagrantfile 240 | ---- 241 | + 242 | Refer: 243 | link:../components/centos/centos-openshift-setup/README.adoc[README] 244 | * To configure an 245 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-mesos-marathon-singlenode-setup/Vagrantfile[Apache 246 | Mesos Marathon] specific container development environment use: 247 | + 248 | ---- 249 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-mesos-marathon-singlenode-setup/Vagrantfile > Vagrantfile 250 | ---- 251 | + 252 | Refer: 253 | link:../components/centos/centos-mesos-marathon-singlenode-setup/README.adoc[README] 254 | 255 | === Manually Download the Vagrant Box 256 | 257 | Alternatively, you can manually download the vagrant box from 258 | http://cloud.centos.org/centos/7/atomic/images/[cloud.centos.org] using 259 | your web browser or curl. For example: 260 | 261 | ---- 262 | # To get the libvirt box 263 | $ wget http://cloud.centos.org/centos/7/atomic/images/AtomicDeveloperBundle--CentOS7-LibVirt.box 264 | 265 | # To get the virtualbox box 266 | $ wget http://cloud.centos.org/centos/7/atomic/images/AtomicDeveloperBundle--CentOS7-VirtualBox.box 267 | ---- 268 | 269 | After you download the box, you can add it to `vagrant` with following command: 270 | ---- 271 | $ vagrant box add projectatomic/adb 272 | ---- 273 | 274 | [NOTE] 275 | ==== 276 | If you want to use a customized name for the box, you need to: 277 | 278 | * Specify your `` in place of `projectatomic/adb` as in: 279 | ---- 280 | $ vagrant box add 281 | ---- 282 | * Add the `` as the value of the `BOX` environment variable with the following command: 283 | ---- 284 | export BOX= 285 | ---- 286 | ==== 287 | 288 | [[adb-behind-http-proxy]] 289 | == Step 6. (Optional) Set up ADB behind an HTTP proxy 290 | 291 | ADB can be set up behind a proxy server. Set the following proxy parameters in the 292 | Vagrantfile you chose in the previous step: 293 | 294 | .... 295 | config.servicemanager.proxy = 296 | config.servicemanager.proxy_user = 297 | config.servicemanager.proxy_password = 298 | .... 299 | 300 | Once these settings are applied, they are passed through to the Docker and 301 | OpenShift services to enable them to function correctly. 302 | In an unauthenticated proxy environment, the `proxy_user` and `proxy_password` 303 | configurations can be omitted. 304 | 305 | == Step 7. Start ADB 306 | 307 | Start ADB by running the `vagrant up` command. 308 | 309 | ---- 310 | $ vagrant up 311 | ---- 312 | 313 | This will start ADB and set it up to work with the provider of 314 | choice, for use with host-based tools or via `vagrant ssh`. 315 | 316 | [NOTE] 317 | ==== 318 | On Fedora and CentOS you may need to specify the virtualization 319 | provider to use. For example, to use VirtualBox, the command would be: 320 | ---- 321 | $ vagrant up --provider virtualbox 322 | ---- 323 | ==== 324 | 325 | At this point your Atomic Developer Bundle installation is complete. You 326 | can find link:using.adoc[ADB usage information] in the documentation 327 | directory. 328 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | = Atomic Developer Bundle 2 | :toc: 3 | :toc-placement!: 4 | 5 | Atomic Developer Bundle (ADB) is a prepackaged development environment 6 | filled with production-grade, pre-configured tools, that makes container 7 | developers' lives easier. ADB supports the development of 8 | multi-container applications against different technologies and 9 | orchestrators while providing a path that promotes best practices. 10 | 11 | ''' 12 | toc::[] 13 | ''' 14 | [[advantages]] 15 | == Advantages of ADB 16 | 17 | As a container developer, you want to use ADB for these reasons: 18 | 19 | * **Pre-Configured**: You don't have to spend time building an 20 | environment and fighting configuration battles. 21 | 22 | * **Multiple Environment Support**: ADB works on Windows, Linux and Mac 23 | OS X. ADB supports several orchestrators (OpenShift, Kubernetes, Mesos, 24 | and plain Docker). ADB is language independent and supports multiple 25 | developer models (IDE, CLI, SSH containment). 26 | 27 | * **Production-Grade**: The components of ADB are configured to behave 28 | just as they will in production. Containers promise seamless delivery, 29 | but only if you test them in the right environment. This is that 30 | environment. 31 | 32 | * **Self-Contained**: ADB is ready to go once installed. It comes 33 | prepackaged with the most common components ready, in case they are 34 | needed. 35 | 36 | * **Open Source**: ADB leverages existing tools and technologies 37 | wherever possible to avoid pushing a developer into an environment that 38 | won't be supportable in production or that is tied to a single vendor. 39 | This also means it benefits from the stability of existing projects 40 | instead of reinventing the wheel. 41 | 42 | ADB is a virtual machine that is executed with Vagrant and some Vagrant 43 | plugins. 44 | 45 | [[when-to-use]] 46 | == When would ADB typically be used? 47 | 48 | A developer begins using ADB, in most cases, once they have a working 49 | application that has been decomposed into micro-services. They then 50 | follow this general outline of steps: 51 | 52 | . Consider ways to divide your application into its component services 53 | or micro-services. For standard pieces, such as web servers, consider 54 | using pre-built containers from trusted sources. For truly unique 55 | pieces, build a custom container. 56 | 57 | . Confirm the application works in ADB by manually launching the 58 | application's container components or by using the instance of OpenShift 59 | in the container to launch the application. 60 | 61 | . Build orchestration configurations that provide scaling and other 62 | required features, or complete the OpenShift application configuration. 63 | Alternatively, build a Nulecule description of the application. 64 | 65 | . Test the application. 66 | 67 | The http://docs.projectatomic.io/container-best-practices/[Container 68 | Best Practices] document in this project may also be of interest. 69 | 70 | [[typical-usage-pattern]] 71 | == What is the typical usage pattern? 72 | 73 | ADB supports three basic modes of usage. The modes vary by how much they 74 | rely on tools on the developer's workstation. From most to least 75 | reliant, they are: 76 | 77 | * Host-based IDE Mode 78 | + 79 | This mode uses ADB as a server resource for host-based IDE tools. In 80 | this mode, the user will run `eclipse` or other IDE tools that will 81 | access the resources of ADB. 82 | 83 | * Host-based CLI Mode 84 | + 85 | This mode uses ADB as a server resource for host-based CLI tools. In 86 | this mode, the user will run `docker` and other CLI tools on their 87 | workstation and the result will be containers executed inside of ADB. 88 | 89 | * SSH Mode 90 | + 91 | This mode uses ADB as a Linux virtual machine. The user will use the 92 | `ssh` command to log into ADB and will directly execute `docker` and 93 | other commands from the command line. This is similar to having 94 | installed a Linux virtual machine and then installing and configuring 95 | all of the software ADB ships with. 96 | 97 | More information about link:docs/using.adoc[using ADB] is available. 98 | 99 | [[adb-related-projects]] 100 | == What does ADB utilize? 101 | 102 | ADB is built on top of https://www.centos.org/[CentOS 7] and the 103 | following projects: 104 | 105 | * https://www.docker.com/[Docker]: container runtime and packaging 106 | 107 | * https://github.com/projectatomic/atomic/[Atomic CLI]: container usage 108 | assistance 109 | 110 | * http://kubernetes.io/[Kubernetes]: container orchestration 111 | 112 | * http://www.openshift.org/[OpenShift Origin]: a next generation PaaS 113 | for docker containers 114 | 115 | * https://github.com/projectatomic/openshift2nulecule/[openshift2nulecule]: 116 | a tool that creates a Nulecule application from an existing OpenShift 117 | project 118 | 119 | * https://mesosphere.github.io/marathon/[Mesos Marathon]: a 120 | production-grade container orchestration platform for Mesosphere's 121 | Datacenter Operating System (DCOS) and Apache Mesos 122 | 123 | ADB supports https://github.com/projectatomic/atomicapp/[Atomic App], an 124 | implementation of the multi-container application specification 125 | https://github.com/projectatomic/nulecule/[nulecule], for 126 | multi-container applications. 127 | 128 | You need to use the customized Vagrantfiles provided in ADB project to 129 | set up the above mentioned environments. For further details refer to 130 | the Installation steps in the next section. 131 | 132 | [[quick-install-run]] 133 | == How do I install and run ADB? 134 | 135 | Below is an installation overview using the most common options. 136 | Detailed link:docs/installing.adoc[installation instructions] are 137 | available. 138 | 139 | . https://www.virtualbox.org/wiki/Downloads[Install VirtualBox] for 140 | your operating system. 141 | 142 | . https://docs.vagrantup.com/v2/installation/index.html[Install 143 | Vagrant] for your operating system. 144 | 145 | . Install the https://github.com/projectatomic/vagrant-service-manager[vagrant-service-manager], 146 | https://github.com/dustymabe/vagrant-sshfs[vagrant-sshfs], and https://github.com/vagrant-landrush/landrush[landrush] 147 | Vagrant plugins. 148 | + 149 | ---- 150 | $ vagrant plugin install vagrant-service-manager vagrant-sshfs landrush 151 | ---- 152 | Some operating systems may need additional dependencies to be 153 | installed before you proceed with the installation of the vagrant 154 | plugins. For details refer to the detailed 155 | link:docs/installing.adoc[Installation document]. 156 | 157 | . Download the customized Vagrantfiles provided by the ADB project. 158 | These Vagrantfiles will download ADB and automatically set up 159 | provider-specific container development environments. They are listed 160 | below and more details are available in the 161 | link:docs/installing.adoc[Installation document]. 162 | + 163 | To download ADB and set up a provider-specific container development 164 | environment: 165 | + 166 | .. Create a directory for the Vagrant box. 167 | + 168 | ---- 169 | $ mkdir directory && cd directory 170 | ---- 171 | 172 | .. Download any of the following vagrantfiles, to configure the 173 | development environment you need. 174 | * To configure a 175 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-docker-base-setup/Vagrantfile[Docker 176 | specific container development environment] use: 177 | + 178 | ---- 179 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-docker-base-setup/Vagrantfile > Vagrantfile 180 | ---- 181 | * To configure a 182 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-k8s-singlenode-setup/Vagrantfile[Kubernetes 183 | specific container development environment] use: 184 | + 185 | ---- 186 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-k8s-singlenode-setup/Vagrantfile > Vagrantfile 187 | ---- 188 | * To configure an 189 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-openshift-setup/Vagrantfile[OpenShift 190 | Origin specific container development environment] use: 191 | + 192 | ---- 193 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-openshift-setup/Vagrantfile > Vagrantfile 194 | ---- 195 | * To configure an 196 | https://github.com/projectatomic/adb-atomic-developer-bundle/blob/master/components/centos/centos-mesos-marathon-singlenode-setup/Vagrantfile[Apache 197 | Mesos Marathon specific container development environment] use: 198 | + 199 | ---- 200 | $ curl -sL https://raw.githubusercontent.com/projectatomic/adb-atomic-developer-bundle/master/components/centos/centos-mesos-marathon-singlenode-setup/Vagrantfile > Vagrantfile 201 | ---- 202 | 203 | . Start ADB. 204 | + 205 | ---- 206 | vagrant up 207 | ---- 208 | + 209 | This will download ADB and set it up to work with the provider of 210 | choice, for use with host-based tools or via `vagrant ssh`. You may wish 211 | to review the link:docs/using.adoc[Using Atomic Developer Bundle] 212 | documentation before starting ADB, especially if you are using 213 | host-based tools. 214 | 215 | [[included-features]] 216 | == Which features are included? 217 | 218 | Currently, the box provides the following: 219 | 220 | * Docker support to unsupported platforms (i.e. Microsoft Windows, Mac 221 | OS X, etc.) 222 | * Kubernetes orchestration for local testing of applications 223 | * Application definition using the Nulecule specification 224 | 225 | Additional goals, objectives and work in progress can be found on the 226 | Project Atomic https://trello.com/b/j1rEolFe/container-tools[trello 227 | board]. 228 | 229 | [[deliverables]] 230 | == What are the deliverables and where are they delivered? 231 | 232 | ADB is delivered as a Vagrant box for various (currently libvirt and 233 | VirtualBox) providers. The boxes are built using the CentOS powered 234 | https://wiki.centos.org/HowTos/CommunityBuildSystem[Community Build 235 | System]. Boxes are delivered via 236 | https://atlas.hashicorp.com/boxes/search[Hashicorp's Atlas] and are 237 | available at 238 | http://cloud.centos.org/centos/7/vagrant/x86_64/images/[cloud.centos.org]. 239 | These boxes differ from existing Vagrant boxes for CentOS as they have 240 | specific build requirements that are not enabled in those boxes. 241 | 242 | [[documentation]] 243 | == Documentation 244 | 245 | * link:docs/installing.adoc[Installing ADB] 246 | * link:docs/using.adoc[How to use ADB] 247 | ** link:docs/cockpit.adoc[Using Cockpit with ADB] 248 | * link:docs/staging.adoc[Staging your application] 249 | * link:docs/troubleshooting.adoc[Troubleshooting ADB] 250 | * link:docs/updating.adoc[Updating ADB] 251 | * link:docs/building.adoc[Building the Vagrant box] for Developers 252 | 253 | [[contributing]] 254 | == Interested in Contributing to this project? 255 | 256 | We welcome new ideas, suggestions, issues and pull requests. Want to be 257 | more involved, join us: 258 | 259 | * Mailing List: 260 | https://www.redhat.com/mailman/listinfo/container-tools[container-tools@redhat.com] 261 | * IRC: #atomic and #nulecule on https://freenode.net/[freenode] 262 | * Weekly Standup/Review/Planning Meeting: Every Monday at 1300 UTC in 263 | #nulecule (https://freenode.net/[freenode]) for 0.5 hour. An agenda for 264 | this meeting is maintained at https://titanpad.com/adbmeeting 265 | 266 | Documentation is written using 267 | http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[ASCIIDoc]. 268 | You can create and edit content in your favorite text editor with 269 | http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[live preview]. 270 | 271 | For detailed information about contributing to the projects, 272 | see link:CONTRIBUTING.adoc[how to contribute]. 273 | 274 | [[additional-resources]] 275 | == Additional online resources 276 | 277 | * Using OpenShift in ADB: 278 | http://www.projectatomic.io/blog/2016/05/App-Development-on-OpenShift-using-ADB 279 | * Using Kubernetes in ADB: 280 | http://www.projectatomic.io/blog/2016/04/k8s-adb-usage/ 281 | * Introduction to ADB from DevConf.cz 2016: 282 | https://www.youtube.com/watch?v=jxFw6qnGaRk 283 | * OpenShift in ADB Quickstart (video): 284 | https://www.youtube.com/watch?v=H58prwM3IbE 285 | -------------------------------------------------------------------------------- /CHANGELOG.adoc: -------------------------------------------------------------------------------- 1 | = Revision History 2 | :toc: 3 | 4 | [[v2.4.0-dec-08-2016]] 5 | == 2.4.0 December 08, 2016 6 | 7 | * Fix typo in vagrant global-status instruction @budhrg 8 | * Fix #600, adding a few more useful commands to the Using Doc @Preeticp 9 | * Fixed section IDs and relative links @thatdocslady 10 | * Fix issue with OPENSHIFT_HOSTNAME not showing for 'oc login' @gbraad 11 | * Fix #566 Updated Proxy section with the relevant steps from VSM @Preeticp 12 | * Fix #570 Consistent format for setting Vagrantfile configurations @budhrg 13 | * Fix for #591. Fixing nsswitch.conf in RHEL CDK kickstart file @LalatenduMohanty 14 | * Issue #582, Modifying IMAGE_TAG to be a null string @LalatenduMohanty 15 | * Fix #545 Make box name configurable in Vagrantfile @budhrg 16 | * Fix #588 No section for hyperv in OSE Vagrantfile @praveenkumar 17 | * Formatting fixes and style convention adjustments @thatdocslady 18 | * Added documentation on staging your application with the local OpenShift registry @thatdocslady 19 | * Remove rst format doc now adoc is available for same @praveenkumar 20 | * Adding OCP tag in the RHEL-OSE Vagrantfile for CDK @LalatenduMohanty 21 | * Fix #577 Update CDK version to next release (2.3) @praveenkumar 22 | * Modifying the OpenSHift vagrant up output to use VSM install-cli feature @LalatenduMohanty 23 | * Fix #575 Update OSP tag with latest release @praveenkumar 24 | * Refactored SSH section based on feedback @thatdocslady 25 | * Fix #540 \~/.vagrant.d/Vagrantfile does not affect vagrant-registration @budhrg 26 | * Minor formatting and grammar fix @Preeticp 27 | * Fix #564; added note saying - name of CDK box must correspond to the name used by the vagrantfile @Preeticp 28 | * Cleaned up formatting and structure issues that arose from the asciidoc conversion @thatdocslady 29 | * Fixes #523, #525, #518, #494 @Preeticp 30 | * Enable live-rendering of TOC in GitHub for adoc files @thatdocslady 31 | * Converted all doc files to asciidoc @thatdocslady 32 | * Fix #554 Updated OSE to Openshift container platform @budhrg 33 | * Fix #550 add .cdk file should be in cdk.zip for devsuite @praveenkumar 34 | * Added note about updating ADB on Windows machines and adjusted prerequisites and formatting @thatdocslady 35 | * Fix #548 update OSE tag @praveenkumar 36 | *Updating additional dependencies for landrush (Fedora -> Fedora 23/24) 37 | * Fix #481 Restructured ADB doc, removed Vagrantfile section since mentioned in Readme and Installation docs and moved Installing ADB behind Proxy section to Installation doc @Preeticp 38 | * Update CDK version to 2.2 @praveenkumar 39 | * Fix wording in Vagrant up message for Openshift Vagrantfile @budhrg 40 | 41 | [[v2.3.1-sep-08-2016]] 42 | == 2.3.1 September 08, 2016 43 | 44 | * Fix #534. Fixing the CDK OpenShift kickstart file to cache ose-pod 45 | container image @LalatenduMohanty 46 | * Increasing the /etc/os-release version to 2.3.0 @LalatenduMohanty 47 | * Fix #532 disable rsync and use sshfs by default in CDK Kubernetes 48 | Vagrantfile @praveenkumar 49 | * Fix #528 Failed to start Etcd Server K8s Vagrantfile @praveenkumar 50 | * Revert landrush plugin for CDK Vagrantfiles @praveenkumar 51 | * Fix #444, added CDK product page link and cleaned up formatting issues 52 | @Preeticp 53 | * Fix #509 Proxy support k8s vagrantfile @praveenkumar 54 | * Fix #517 rsync: connection unexpectedly closed @praveenkumar 55 | * Updated centos-k8s Vagrantfile to start through service-manager hook 56 | @budhrg 57 | * Adding Budh Ram Gurung(@budhrg) as maintainer @budhrg 58 | * Adding suspend_mode = 'managedsave' in libvirt configuration @rimolive 59 | 60 | [[v2.3.0-aug-10-2016]] 61 | == 2.3.0 August 10, 2016 62 | 63 | * Add Landrush as plugin requirement in Vagrantfile @praveenkumar 64 | * Unify Vagrantfile for different Providers @praveenkumar 65 | * Fixes issue #488. Using ENV variables for proxy @LalatenduMohanty 66 | * Issue #461 Enabling Landrush per default @hferentschik 67 | * Fix a couple broken links @shawnlower 68 | * Updated latest openshift tag @praveenkumar 69 | * Fix #478 Vagrantfile update for proxy support @praveenkumar 70 | * Fix #379 added note about using the latest origin image and corrected 71 | installation doc link @preeticp 72 | * Fix #460 Doc update for proxy support @praveenkumar 73 | * Fix #472, #473 and #477 @preeticp 74 | * marathon: embed ansible playbook in Vagrantfile @dustymabe 75 | * marathon: setup so that ports from host can be shared @dustymabe 76 | 77 | [[v2.2.2-jul-18-2016]] 78 | == 2.2.2 July 18, 2016 79 | 80 | * Update README to add Mesos-Marathon and cache notes @bexelbie 81 | * Bumping /etc/os-release for ADB release 2.2.2 @@LalatenduMohanty 82 | * Fix #463 Update ose tag to 3.2.1.4 in CDK @praveenkumar 83 | * Install atomicapp as a part of provisioning in Mesos Marathon 84 | Vagrantfile @dharmit 85 | 86 | [[v2.2.1-jun-23-2016]] 87 | == 2.2.1 June 23, 2016 88 | 89 | * Fixes Issue #325; Improved Readme installation instructions and 90 | general clean up @preeticp 91 | * Bumping up os-release file for ADB 2.2.1 release @LalatenduMohanty 92 | * Improved Installation workflow and general clean up. @preeticp 93 | * Adding "-provider hyperv" to "vagrant up" in README files for Hyper-V 94 | @LalatenduMohanty 95 | * Adding Vagrantfiles for HyperV. @LalatenduMohanty 96 | * Adding HyperV support to the CDK kickstart file. @LalatenduMohanty 97 | * Updating README_CDK_ZIP with vagrant-sshfs information 98 | @LalatenduMohanty 99 | * Adding some blogs and youtube videos from web to readme 100 | @LalatenduMohanty 101 | * Fix #428 Success message after vagrant up for k8s-singlenode-setup 102 | @praveenkumar 103 | * Issue #272 Disabling /vagrant folder sync via rsync @hferentschik 104 | * Issue #336 Mounting users home directory into VM using vagrant-sshfs 105 | @hferentschik 106 | * Update OpenShift Origin default version to 1.2.0 @praveenkumar 107 | 108 | [[v2.2.0-june-9-2016]] 109 | == 2.2.0 June 9, 2016 110 | 111 | * Update variant information @praveenkumar 112 | * Can not change securityContext in k8s @praveenkumar 113 | * Fix #422 Failed to get pwuid struct: user: unknown userid 114 | @praveenkumar 115 | * Reduce vagrant box size #176 @praveenkumar 116 | * rhel-k8s Vagrantfile: fix in getting credentials @optak 117 | * Changes for Release 2.2.0 @LalatenduMohanty 118 | * Add openshift tag information to kickstart instead in 119 | sccli/openshift_options @praveenkumar 120 | * Fix #415 add yum clean all step to kickstart file to remove yum local 121 | cache @praveenkumar 122 | * Fix #414 kube-apiservice shouldn't be part of kickstart file 123 | @praveenkumar 124 | * Remove Public_Host variable from OpenShift Vagrantfile @praveenkumar 125 | * Fix #407 for "Error: dev/null: No such file or directory" 126 | @praveenkumar 127 | * Fixes #347 Run provisioners for every vagrant up. @LalatenduMohanty 128 | * Updated cockpit guide to start cockpit @budhrg 129 | * Fixes #251: Adding sccli/ADB Utils repo link in the ADB Usage doc. 130 | @preeticp 131 | * Docker SELinux context not set properly when building vagrant box. 132 | @praveenkumar 133 | * Add https://titanpad.com/adbmeeting to README @bexelbie 134 | 135 | [[v2.1.0-may-19-2016]] 136 | == 2.1.0 May 19, 2016 137 | 138 | * Fix #353: Add VSM config to docker setup and removed Vagrantbox Readme 139 | @praveenkumar 140 | * Bumping /etc/os-release to 2.1.0 @LalatenduMohanty 141 | * Remove development group from kickstart @praveenkumar 142 | * Updated cockpit guide to start cockpit @budhrg 143 | 144 | [[v2.0.0-apr-28-2016]] 145 | == 2.0.0 April 28, 2016 146 | 147 | * Fix #351 Suppress logs from systemctl enable for kubernetes 148 | @praveenkumar 149 | * Remove the workaround for downgrading python-docker-py 150 | @LalatenduMohanty 151 | * Adding openshift2nulecule to ADB @LalatenduMohanty 152 | * Update os-release to 2.0.0 @LalatenduMohanty 153 | * Fix #103: build_tools/kickstarts/rhel-7-cdk-vagrant.ks @praveenkumar 154 | * Fix #345: Suppress logs of openssl genrsa on Vagrant up for Kubernetes 155 | @budhrg 156 | * Fix #342: Use systemctl to start openshift service in CDK OSE 157 | Vagrantfile @LalatenduMohanty 158 | * Fix #334: Disables openshift service for CDK k8s Vagrantfile 159 | @navidshaikh 160 | * Fix-256: Add check for vagrant-registration plugin @budhrg 161 | * Refactored code for checking required plugins for CentOS files @budhrg 162 | * Update README for RHEL component @praveenkumar 163 | * Fix #326 (dev part) disk partition fix @praveenkumar 164 | * Fix #332 Vagrantfile var name fix @optak 165 | * Removed kube-apiserver service file duplication @praveenkumar 166 | * Added Notes on Default for ADB/CDK; Docker version mismatch; and moved 167 | relevant VSM steps.@preeticp 168 | * Fix #228 Add Cockpit @bexelbie 169 | * Fix #251; Adding sccli/ADB Utils repo link in the ADB Usage doc 170 | @preeticp 171 | 172 | [[v1.8.0-apr-5-2016]] 173 | == 1.8.0 April 5, 2016 174 | 175 | * Update Vagrantfiles with RHEL files @LalatenduMohanty 176 | * Update os-release to 1.8.0 @LalatenduMohanty 177 | * Remove docker-registry from installed packages @praveenkumar 178 | * Use copy rather than shell in ansible playbook for Mesos Vagrantfile 179 | @mscherer 180 | * Adding fuse-sshfs to the ADB box @LalatenduMohanty 181 | 182 | [[v1.7.2-mar-24-2016]] 183 | == 1.7.2 March 24, 2016 184 | 185 | * Changes for release 1.7.2 @LalatenduMohanty 186 | * OpenShift Vagrantfile mod to reflect new command @bexelbie 187 | 188 | [[v1.7.1-mar-9-2016]] 189 | == 1.7.1 March 9, 2016 190 | 191 | * Revert "Adding openshift2nulecule to ADB" @LalatenduMohanty 192 | * Adding openshift2nulecule to ADB @LalatenduMohanty 193 | * Update docs for Fedora libvirt @bexelbie 194 | * Fixing minor typos @Preeticp 195 | * Fixing a typo @Preeticp 196 | * Adding vagrant-service-manager to the Vagrantfiles @LalatenduMohanty 197 | * Removing the sed commands beacsue these are not required anymore 198 | @LalatenduMohanty 199 | * Deleting unneeded landrush information @bexelbie 200 | * Adding changelog for ADB 1.7.0 @LalatenduMohanty 201 | * Bumping the Vagrant box version in the build script to 1.7 202 | @LalatenduMohanty 203 | * Support openstack provider in vagrantfiles @vrutkovs 204 | * Set ip address for marathon and mesos-slave before installing 205 | packages. @kadel 206 | 207 | [[v1.7.0-feb-17-2016]] 208 | == 1.7.0 February 17, 2016 209 | 210 | * Adding link to older OpenShift Vagrantfile @LalatenduMohanty 211 | * Adding adb-utils, centos-release-adb @LalatenduMohanty 212 | * Updates usage docs with renamed plugin vagrant-service-manager 213 | @navidshaikh 214 | * Renames adbinfo with service-manager plugin in README @navidshaikh 215 | * Bumping the os-release version to 1.7.0 @LalatenduMohanty 216 | * Fix #224 (Provision fails after rebooting the machine) @praveenkumar 217 | * Fix #226 (cert-gen script should be part of adb-utils package) 218 | @praveenkumar 219 | * Fix #222 httpd-tools package should be present in kickstart file 220 | @praveenkumar 221 | * Added IP Address info to conf files of mesos-slave and Marathon 222 | @dharmit 223 | * Fixed a broken link @containscafeine 224 | * Provide more debug output @voxik 225 | * Fix #207 and #208 @praveenkumar 226 | * Updates the quotes for box update documentation @navidshaikh 227 | * Updating MAINTAINERS for atlas.hashicorp.com info @bexelbie 228 | * Add a Changelog @bexelbie 229 | * Cleanup old ADB v1 files @bexelbie 230 | 231 | [[v1.6.0-jan-21-2016]] 232 | == 1.6.0 January 21, 2016 233 | 234 | * Adds Praveen Kumar as maintainer for ADB @navidshaikh 235 | * Update Docs for vagrant-libvirt bug @bexelbie 236 | * Use projectatomic/adb as box for centos-openshift-setup @kadel 237 | * Changed the state of packages installed via Ansible from latest to 238 | present @dharmit 239 | * Updating Mesos Marathon use information @LalatenduMohanty 240 | * Fix #183, added version info for ADB @praveenkumar 241 | * Update README to be more readable in a text editor @bexelbie @tkdchen 242 | * Vagrantfile for Mesos-Marathon setup @dharmit 243 | * Fix #175 and #174, Add CI for spell and kickstart check @praveenkumar 244 | * Fix and re-organize docs @tkdchen 245 | * More minor doc fixes @bexelbie 246 | * Fixing RST Format Typos @bexelbie 247 | * Documentation Updates for Usage @bexelbie 248 | * Update the OpenShift Vagrantfile's README @bexelbie 249 | * Cleanup k8s Vagrantfile Readme and add network @bexelbie 250 | * Update the base example Vagrantfile and README @bexelbie 251 | * Updates Install for better libvirtd comments @bexelbie 252 | * Changes atlas namespace to projectatomic/adb @LalatenduMohanty 253 | * Updates docs with Eclipse integration notes @bexelbie 254 | 255 | [[v1.5.0-dec-16-2015]] 256 | == 1.5.0 December 16, 2015 257 | 258 | Release announcement: http://www.projectatomic.io/blog/2015/12/ADB-1-5/ 259 | 260 | _Prior Releases were unannounced and mostly project-internal._ 261 | -------------------------------------------------------------------------------- /docs/using.adoc: -------------------------------------------------------------------------------- 1 | = Using Atomic Developer Bundle 2 | :toc: 3 | :toc-placement!: 4 | 5 | This document describes how to configure and use ADB and its related plugins. 6 | 7 | ''' 8 | toc::[] 9 | ''' 10 | 11 | [[principles]] 12 | == Principles 13 | 14 | Consider ADB to be ephemeral and do not store data in it long term. It 15 | is recommended that you do the following: 16 | 17 | * Back up your code. 18 | * Use a source control system. 19 | * Mount your code into the box from your host system. The ADB Vagrantfiles 20 | already mount your home directory from the host into ADB using 21 | https://github.com/dustymabe/vagrant-sshfs/[vagrant-sshfs]. Additional 22 | shares can also be defined. Refer to the 23 | link:#vagrant-bi-directional-folder-sync[bi-directional folder sync 24 | section] for more information. 25 | 26 | Doing these things is beyond the scope of this document. Consult your 27 | Operating System manuals and the http://vagrantup.com/[Vagrant] website 28 | for more details. 29 | 30 | Once you start ADB you can use it as: 31 | 32 | * a server resource for host-based tools (Eclipse/CLIs) or 33 | * a Linux virtual machine. 34 | 35 | For a quick high level glimpse at ADB and how you can use it refer to 36 | the link:../README.adoc[Readme]. 37 | 38 | For detailed instructions on how to install ADB refer to the 39 | link:installing.adoc[Installation Document]. 40 | 41 | [[using-host-based-tools]] 42 | == Using ADB with host-based tools (Eclipse and CLIs) 43 | 44 | Many users have preferred development environments built from tools 45 | running on their development workstation. Even if these workstations are 46 | unable to run containers or container-components natively, the user may 47 | still want to use their preferred tools, editors, etc. ADB can be used 48 | with these tools in a way that makes it seamless to interact with files, 49 | preferred development tools, etc. 50 | 51 | ADB exposes the docker daemon port and orchestrator access points so 52 | that tools like Eclipse and various CLIs can interact with them. For 53 | security reasons, some ports, such as the docker daemon port, are TLS 54 | protected. Therefore some configuration is required before the service 55 | can be accessed. Vagrant-service-manager makes this configuration simple 56 | by providing easy access to the TLS certificates and the other 57 | environment variables or configuration information. 58 | 59 | To use ADB with Host-Based tools: 60 | 61 | === Install and configure Vagrant and plugins 62 | 63 | . Install the vagrant-service-manager plugin: 64 | + 65 | .... 66 | vagrant plugin install vagrant-service-manager 67 | .... 68 | + 69 | More information about the vagrant-service-manager plugin is available 70 | in the source repository_. 71 | 72 | . Enable the desired service(s) in the ADB Vagrantfile as: 73 | + 74 | .... 75 | config.servicemanager.services = 'openshift' 76 | .... 77 | + 78 | [NOTE] 79 | ==== 80 | * Docker is the default service for ADB and does not require any 81 | configuration to ensure it is started. Red Hat Enterprise Linux 82 | Container Development Kit, which is based on Atomic Developer Bundle, 83 | automatically starts OpenShift. 84 | * You can use a comma-separated list to enable multiple services. For 85 | instance: docker, openshift. 86 | ==== 87 | 88 | . Enable the relevant option for the services you have selected in the 89 | Vagrantfile as: 90 | + 91 | For example, specific versions of OpenShift can be specified using the 92 | following variables: 93 | + 94 | * `config.servicemanager.openshift_docker_registry = "docker.io"` - 95 | Specifies the registry from where the service should be pulled. 96 | + 97 | * `config.servicemanager.openshift_image_name = "openshift/origin"` - 98 | Specifies the image to be used. 99 | + 100 | * `config.servicemanager.openshift_image_tag = "v1.2.0"` - Specifies 101 | the version of the image to be used. 102 | 103 | . Start ADB using `vagrant up`. You will find detailed installation 104 | instructions in the link:installing.adoc[Installation document]. 105 | 106 | === Configure your environment 107 | 108 | Configure the environment and download the required TLS certificates 109 | using the plugin. The example below shows the command and the output for 110 | Linux and Mac OS X. On Microsoft Windows the output may vary depending 111 | on the execution environment: 112 | 113 | .... 114 | $ vagrant service-manager env 115 | # docker env: 116 | # Set the following environment variables to enable access to the 117 | # docker daemon running inside of the vagrant virtual machine: 118 | export DOCKER_HOST=tcp://10.1.2.2:2376 119 | export DOCKER_CERT_PATH=/foo/bar/.vagrant/machines/default/virtualbox/docker 120 | export DOCKER_TLS_VERIFY=1 121 | export DOCKER_API_VERSION=1.21 122 | 123 | # run following command to configure your shell: 124 | # eval "$(vagrant service-manager env)" 125 | .... 126 | 127 | Setting these environment variables allows programs, such as Eclipse and 128 | the docker CLI to access the docker daemon. 129 | 130 | [NOTE] 131 | ==== 132 | When the OpenShift service is running in the VM, a Docker 133 | registry is also started. This Docker registry can be used by external 134 | tools such as Eclipse to push or pull images. The Docker registry URL is 135 | exported as a variable, and can be accessed by running the following 136 | command: 137 | .... 138 | $ vagrant service-manager env openshift 139 | # openshift env: 140 | # You can access the OpenShift console on: https://10.1.2.2:8443/console 141 | # To use OpenShift CLI, run: oc login https://10.1.2.2:8443 142 | export OPENSHIFT_URL=https://10.1.2.2:8443 143 | export OPENSHIFT_WEB_CONSOLE=https://10.1.2.2:8443/console 144 | export DOCKER_REGISTRY=hub.openshift.centos7-adb.10.1.2.2.xip.io 145 | .... 146 | ==== 147 | 148 | === Develop your application with the CLI 149 | 150 | If you do not have the docker CLI, you can use the `install-cli` command: 151 | 152 | .... 153 | $ vagrant service-manager install-cli docker 154 | .... 155 | 156 | However, if you are using the docker CLI, you can just run it from the 157 | command line and it will work as expected. 158 | 159 | [NOTE] 160 | ==== 161 | If you encounter a Docker client and server version mismatch such as: 162 | .... 163 | $ docker ps 164 | Error response from daemon: client is newer than server (client API version: 1.21, server API version: 1.20) 165 | .... 166 | You will need to download an earlier compatible version of Docker for 167 | your host machine. Docker release versions and docker API versions are 168 | not the same. Typically, you will need to try the previous release (i.e. 169 | if you get this error message using a docker 1.9 CLI, try a docker 1.8 170 | CLI). 171 | ==== 172 | 173 | === Configure Eclipse 174 | 175 | If you are using Eclipse, you should follow these steps: 176 | 177 | . Install the 178 | http://www.eclipse.org/community/eclipse_newsletter/2015/june/article3.php[Docker 179 | Tooling] plugin. 180 | 181 | . Enable the three Docker Views (Docker Explorer, Docker Containers, 182 | and Docker Images) by choosing **Windows -> Show Views -> Others**. 183 | 184 | . Enable the Console by choosing **Windows -> Show Views -> Console**. 185 | 186 | . In the **Docker Explorer** view, click to add a connection and provide 187 | a connection name. If your environment variables are set correctly, the 188 | remaining fields will auto-populate. If not, using the output from 189 | `vagrant service-manager env docker`, put the DOCKER_HOST variable in the 190 | **TCP Connection** field and the DOCKER_CERT_PATH variable in the 191 | **Authentication Section** path. 192 | 193 | . You can test the connection and then accept the results. At this 194 | point, you are ready to use ADB with Eclipse. 195 | + 196 | NOTE: Testing has been done with Eclipse 4.5.0. 197 | 198 | [[using-ssh]] 199 | == Using the VM via SSH 200 | 201 | You can access the VM by using `ssh` to login to it with the following command: 202 | 203 | .... 204 | vagrant ssh 205 | .... 206 | 207 | You are now at a shell prompt inside the Vagrant VM. You can now 208 | execute commands and use the tools provided. 209 | 210 | === Using sccli 211 | 212 | You can use 213 | https://github.com/projectatomic/adb-utils/blob/master/README.adoc[sccli] 214 | to manage the orchestration services inside ADB. With `sccli`, you can start, stop, 215 | restart, and get the status of orchestration providers like OpenShift, Docker, 216 | and Kubernetes. 217 | 218 | === Using Atomic App and Nulecule 219 | 220 | You can use Atomic App and Nulecule to run ADB. Details on these projects can be 221 | found at: 222 | 223 | * Atomic App: https://github.com/projectatomic/atomicapp 224 | * Nulecule: https://github.com/projectatomic/nulecule 225 | 226 | NOTE: Many Nulecule examples expect a working Kubernetes environment. 227 | Use the 228 | link:../components/centos/centos-k8s-singlenode-setup/Vagrantfile[Vagrantfile] 229 | and refer the corresponding 230 | link:../components/centos/centos-k8s-singlenode-setup/README.adoc[README] 231 | to set up a single node Kubernetes environment. 232 | 233 | [[vagrant-bi-directional-folder-sync]] 234 | == Vagrant bi-directional folder sync 235 | 236 | For an introduction into Vagrant's synced folders feature, we recommend 237 | you to start with the corresponding 238 | https://www.vagrantup.com/docs/synced-folders/basic_usage.html[Vagrant 239 | documentation]. 240 | 241 | Synced folders enable movement of files (such as, code files) between 242 | the host and the Vagrant guest. Apart from the 243 | https://www.vagrantup.com/docs/synced-folders/rsync.html[rsync synced 244 | folder type], synced folder types are usually bi-directional and 245 | continuously sync the folder while the guest is running. 246 | 247 | The following synced folder types work out of the box with the ADB 248 | Vagrant box, for both Virtualbox as well as Libvirt/KVM : 249 | 250 | vagrant-sshfs:: 251 | https://github.com/dustymabe/vagrant-sshfs[vagrant-sshfs] works with 252 | Linux/GNU, OS X and Microsoft Windows. It is the recommended choice for 253 | enabling synced folders and the 254 | link:#using-custom-vagrantfiles-for-specific-use-cases[custom 255 | Vagrantfile examples] use it per default. 256 | + 257 | In the suggested default 258 | configuration, your home directory on the host (for example, 259 | `/home/john`) is synced to the equivalent path on the guest VM 260 | (`/home/john`). For Windows users, there is a little caveat, their home 261 | directory (for example, C:\Users\john) must be mapped to a Unix style 262 | path (`/c/users/john`). 263 | 264 | nfs:: 265 | https://www.vagrantup.com/docs/synced-folders/nfs.html[NFS] works 266 | with Linux/GNU and OS X. 267 | 268 | The following folder types are not officially supported but are available as-is: 269 | 270 | SMB:: 271 | https://www.vagrantup.com/docs/synced-folders/smb.html[SMB] works for 272 | Microsoft Windows. This folder type is not officially supported for ADB. 273 | + 274 | You need to install cifs-utils RPM inside ADB, for the SMB synced 275 | folder type to work: 276 | + 277 | .... 278 | sudo yum install cifs-utils 279 | .... 280 | 281 | VirtualBox shared folder:: 282 | https://www.virtualbox.org/manual/ch04.html#sharedfolders[Virtualbox 283 | shared folder] for Virtualbox users with Virtualbox guest additions. Currently 284 | Virtualbox guest additions do not come pre-installed in the ADB Vagrant box. 285 | + 286 | For installation details, please refer to 287 | https://www.virtualbox.org/manual/ch04.html[Virtualbox documentation]. 288 | You can also use 289 | https://github.com/dotless-de/vagrant-vbguest[vagrant-vbguest] plugin to 290 | install Virtualbox guest additions in ADB Vagrant box. 291 | 292 | [[useful-commands]] 293 | == Some useful commands 294 | 295 | `vagrant halt`:: 296 | Stops the vagrant box temporarily. 297 | + 298 | You can use `vagrant halt` to gracefully stop the vagrant box and 299 | continue with your work when you start next with `vagrant up`. This will 300 | not cause any loss of data. It is recommended to stop the vagrant box 301 | before you shutdown your machine, to save CPU and RAM consumption. Also, 302 | powering off your machine without stopping the vagrant box, could cause 303 | errors when you resume using it. 304 | 305 | `vagrant status`:: 306 | Checks the Status of the Vagrant box. 307 | + 308 | Use `vagrant status` to check the status of ADB and to check which 309 | virtualization provider is being used and the status of the provider. 310 | 311 | `vagrant destroy`:: 312 | Destroys the Vagrant box permanently. 313 | + 314 | WARNING: Using `vagrant destroy` will destroy any data you stored in 315 | the Vagrant box. You will not be able to restart this instance and will 316 | have to create a new one using `vagrant up`. 317 | 318 | `vagrant global-status`:: 319 | Displays the state of all active Vagrant environments on your system. Use this to see the status of your Vagrant environment. + 320 | You can use `vagrant global-status --prune` to prune invalid entries, based on stale results. 321 | 322 | `vagrant plugin list`:: 323 | Verifies the vagrant plugins installed on your system. Use this to see a list of the vagrant plugins in your system. 324 | 325 | `vagrant box list`:: 326 | Lists the vagrant boxes on your system. You can use this to verify that your box is installed. 327 | 328 | `vagrant provision`:: 329 | Use this to provision the service of your choice if it fails to start on `Vagrant up`. 330 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | --------------------------------------------------------------------------------