GithubHelp home page GithubHelp logo

atomic-test's Introduction

helloapache

This is an atomic application based on the nulecule specification. Kubernetes and native docker are currently the only supported providers. You'll need to run this from a workstation that has the atomic command. If you wish to use the kubernetes provider, you will also need a kubectl client that can connect to a kubernetes master.

It's a single container application based on the centos/httpd image, but you can use your own.

Option 1: Non-interactive defaults

Run the image. It will automatically use kubernetes as the orchestration provider.

[sudo] atomic run projectatomic/helloapache

Note: This option is not interactive because all params in the Nulecule file have default values.

Option 2: Unattended

  1. Create the file answers.conf with these contents:

    This sets up the values for the two configurable parameters (image and hostport) and indicates that kubernetes should be the orchestration provider.

     [general]
     provider = kubernetes
    
     [helloapache-app]
     image = centos/httpd # optional: choose a different image
     hostport = 80        # optional: choose a different port to expose
    
  2. Run the application from the current working directory

     $ [sudo] atomic run projectatomic/helloapache
     ...
     helloapache
    
  3. As an additional experiment, remove the kubernetes pod and change the provider to 'docker' and re-run the application to see it get deployed on base docker.

Option 3: Install and Run

You may want to download the application, review the configuraton and parameters as specified in the Nulecule file, and edit the answerfile before running the application.

  1. Download the application files using atomic install

     [sudo] atomic install projectatomic/helloapache
    
  2. Rename answers.conf.sample

     mv answers.conf.sample answers.conf
    
  3. Edit answers.conf, review files if desired and then run

     $ [sudo] atomic run projectatomic/helloapache
     ...
     helloapache
    

Test

Any of these approaches should create a kubernetes pod or a running docker container.

With a kubernetes pod, once its state is "Running" curl the minion it's running on.

$ kubectl get pod helloapache
POD                IP                  CONTAINER(S)       IMAGE(S)           HOST                LABELS              STATUS
helloapache        172.17.0.8          helloapache        centos/httpd       10.3.9.216/         name=helloapache   Running
$ curl 10.3.9.216
<bunches_of_html_goodness>

If you test the docker provider, once the container is running, curl the port on your localhost.

$ curl localhost
<bunches_of_html_goodness>

atomic-test's People

Contributors

dustymabe avatar ggallen avatar kbsingh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.