Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

SLES Setup Scripts #97

Closed
wants to merge 38 commits into from

8 participants

Hristo Iliev Patrick Bozeman andyl xinli Mahesh Patil Martin Englund Josh Valdez Ramnivas Laddad
Hristo Iliev

Scripts for automatic installation of Cloud Foundry on SLES11:

prepare.sh - downloads and packages the different parts of the CloudFoundry
common_install.sh - installs common necessary files for all of the CloudFoundry parts(Should be executed on every machine in case of a distributed setup!).
router_install.sh - installs the router component
cc_hm_install.sh - installs the cloud controller and health monitor components
dea_install.sh - installs the dea component
service_install.sh - installs various services currently supported by CloudFoundry

Note: After the installation of the common parts it is advisable to logout and login again.
Note: All installation files have own help messages when executed without parameters.

The scripts perform distributed setup and add proxy settings where needed. They are for SLES11 only and contain no OS detection code since we consider the detection of apps like yum, zipper unreliable - SLES can also have yum for instance.

hsiliev and others added some commits
Hristo Iliev hsiliev Setup scripts for SLES11 a6937c3
Tal Garfinkel nginx proxy support for uploading/downloading files.
Change-Id: Iab9d86e0d102915d3f29dabe764bd4332747769a
8abe4b4
Tal Garfinkel remove uploaded file after it has been packaged up -- eliminates reso…
…urce leak.

Change-Id: Ie27bd3ae0015bd3ad045414dc14bf060190ec2c7
d1f0926
Tal Garfinkel cleanup up temporary directory at startup to prevent persistent resou…
…rce leaks.

Change-Id: I95af33ddeec7961d3670b1563b574b887c58e75a
dec5fa1
Scott Andrews Syncing java submodule with vcap-java's master branch
Change-Id: Ia2f8802f7b5e1736ae1d196ca6cfaee2f2ca9de9
9c59889
Tal Garfinkel added error logging for cloud errors and locking errors so we
get a stack trace when these occur.

Change-Id: Ibf99944804234ed6134d195971e70b98cd3d7dcb
ddf0787
Tal Garfinkel fixed small merge bug.
Change-Id: I40a7dab19828ca58028499e936304f2370ac5374
ce9ebca
Tal Garfinkel -added support for forcing droplet fetch over http.
-minor style fix in dea.

Change-Id: I512303687ae2254bc515f5996d1cc33d1ecbef69
793f2a4
Tal Garfinkel disable nginx front end for cloud_controller by default.
Change-Id: I183b3f045a32d52c4e484e75987ec8b02ff90bac
8afc96c
mpage Fix router/dea unit tests
Change-Id: I475d1f46a53a0a6a301a756d4a4867e664e6a9f4
4a11198
Patrick Bozeman lock ruby 1.9.2 at p180
Change-Id: I1c01e90e443c3d5bf051a370d0e0db936292bcfd
9d8a965
andyl andyl changed README.md to note VM memory requirements
Change-Id: I91565d7e3c0a6ea9ab53007ac3146156857b5060
4cef33b
xinli xinli Install PostgreSQL as a service.
Change-Id: I4ee9bf9fcb994702ab47abb428a62633db0e6c7c
cdb9e6f
Tal Garfinkel -support for downloading logfiles from dea using X-Acel redirect so n…
…ginx

 does all the work.
-fix for dea so that file viewer returns a proper error if a file
doesn't exist instead of just dropping the connection.

Change-Id: I4db50bf7cf0c0adf8cb30ef8f5943e5eb742bf80
e35284a
AB Srinivasan Fix & tests for bug when we have multiple DispatcherServlets in a Spr…
…ing app. See https://issuetracker.springsource.com/browse/CF-9.

Change-Id: I8dc885b29f0f3b48d081d1952c04bb4e4d3678d7
3763900
Mahesh Patil mahpat Chef scripts to deploy cloud foundry
This is part 1 of what I think will be a 3 part change. This change adds the
basic chef recipes to deploy cloudfoundry on a single host. The major change is
to install ruby1.8 and ruby1.9 into a configurable directory. As a result I
added a wrapper script to invoke vcap start that sets up the ruby paths
appropriately before starting indivdual components. Note, these changes do not
download the vcap repo (I will add that in a later change).

Most of the chef recipes were downloaded from the opscode website. Some of them
have been modified to meet our requirements.

Usage:
1.  run dev_setup/bin/vcap_dev_setup to install all the components required
by cloud foundry
2.  run dev_setup/bin/vcap_dev {start, stop, restart} to start cloud foundry
components.

Testing: Installed a base Ubuntu image, ran bvts on cloud foundry installed
using these new scripts.

Change-Id: I22cf25131ae8f8ab725408521a44401578eceedd
54cb368
mpage Add utility classes.
This adds two classes: one for gathering process stats, and another
for both chaining command execution and capturing stderr.

Test plan:
- Unit tests

Change-Id: Iec73cf8731798e0b0b91cf3efaa4b3dfed2f1cd6
c7bd846
Mahesh Patil mahpat Rewrite chef recipes from scratch.
Remove the stock recipes downloaded from opscode website. These were all
written from scratch.

Testing Done: BVT tests

Change-Id: Ibf2cc130e1c80941173ceba3dd4d5574b20d7c14
2f53766
Martin Englund pmenglund micro cloud foundry fix for cloud controller
cloud_controller and dea can't use the same uid base,
as they run on the same system

Change-Id: Icc42369a3d42f834169c2bfa29abc25dad851364
69b43b9
Patrick Bozeman bump services submodule ptr
Change-Id: If637c4fd054ac4e4d3d92aab461d51e4cbbb1b09
044b346
Mahesh Patil mahpat Fix license headers
Change-Id: I0d0ff721fc180bc0650c65964557a435638f8c89
dd07e89
Mahesh Patil mahpat More license fixes
Change-Id: I74502d897bce163486755662a39fc3ce733030f5
2dc2e84
Tal Garfinkel replaced fast_uuid that uses rand with secure_uuid that uses
/dev/urandom.

Change-Id: Ic248cec9908accdd289b4172d2219ba6105056ee
5d6f549
Patrick Bozeman improved debugging for app change/update
Change-Id: Icf17191eb86d49f738a332133d36de6f8b2c2071
fe8804f
Patrick Bozeman Make staging a blocking operation.
The callers of app_manager#stage were written back before
the cc was made async.  The callers assumed that the call to
the stager was a blocking operation and start making other
state modifications to the app immediately after calls
to app_manger#stage.  This leads to races and the hm usually
needs to get involved to fix things up, especially given
that vmc jumps in and restarts apps after doing a service
binding.

Change-Id: Idd987b79b8d897a857912f764791af2219564b58
29ce4b0
mpage Fix log file truncation bug in bin/vcap
bin/vcap redirects stdout/stderr to a log file in /tmp/vcap-run if no log
file is specified in a given component config. This file is not opened in append-mode,
which causes attempts to truncate the temporary log file to fail. Fix this
by opening the file in append-mode and immediately truncating it, thus preserving the
original semantics.

Test plan:

Started vcap locally, truncated a temporary log file, made sure that the
correct size was reflected.

Change-Id: I5c07db56fb9801c08e6fab6ef2d15068fd3cf826
4768086
Tal Garfinkel ensure things still work if nginx: section not present in
cloud_controller.yml.

Change-Id: I81d96a44ed431a8b8ad661f966c0aa3156a7bf00
759c694
Josh Valdez jmvldz Added logging for user auth failures
Change-Id: Ibd3fd37138a3868d30396866e53b76bb286e4a54
3ade69a
mpage Stager component skeleton
This includes a basic gem skeleton that contains all of the staging code from the CC.
Apart from some minor modifications to get this working without Rails, the code is unchanged.

Test plan:

- Supplied unit tests pass

Change-Id: I65d55c686bed1f8d3301c91cd74ed857f3fd3aba
5739fe2
mpage Refactor stager tests
Summary:
- Fix the warning for multiple definitions of AUTOSTAGING_JAR
- Move the embedded startup scripts into the fixture directory (lays the groundwork for fully staged droplets)
- General code cleanup

Test plan:
- Unit tests still pass

Change-Id: I00c8e6246608abc905f4add093592ab887154469
f30f5de
mpage Add helper class for loading/validating config files
This adds a tiny utility class that leverages json_schema to declaratively validate and load
config files. Over time, I'm imagining that we'll migrate all components over to this. Also,
reorganize the common spec directory to be more in line with other spec dirs (functional, unit, fixtures sub directories).

Test plan:
- Ran unit tests

Change-Id: Ib828c1d0ec4edb92c6f2ebe91ab68c36255ef148
08d1bf7
Mahesh Patil mahpat Templates for CF config files. Also change deployment config from jso…
…n to yml.

Added template files for all cf components including services.
Add comments to the deployment yaml config file. Cleanup some of the scripts.

Change-Id: I9209749ab9ca50a2bd894189c571e1b4c33bc77b
e4543b4
mpage Fix require order bug in DEA tests.
Test plan:
- Ran tests

Change-Id: Ie1594996842e27571c4bc478bb5733e091da5288
ea56ded
Patrick Bozeman advance tests submodule ptr
Change-Id: I6f4916cafb6e0041e941e334b8883b1ac29dcaac
a821daf
Ramnivas Laddad ramnivas Moved java submodule forward
Change-Id: If33e5c9865e3fd79546642c26754b0414691dc87
11ed7db
Patrick Bozeman advance tests submodule ptr
Change-Id: I716aefa2264def94e785f8dd60ac6db57f7809c4
031ed8d
Hristo Iliev hsiliev Fixed line endings. New repository option. Parameterized ruby version 52fd9af
Hristo Iliev hsiliev Removed SAP specific no-hosts 822d2ae
Patrick Bozeman

Right around the time you submitted this the platform and setup team started working on a new installer for Cloud Foundry Microclouds using Chef. It is found under the dev_setup directory of the vcap repo.

We haven't switched the README over to pointing this out as an upcoming installation method, but eventually the Chef based installs are going to deprecate the vcap_setup/install mega scripts.

It might be easier to keep SLES and Ubuntu installs in sync if both work off the Chef based install.

Would you mind looking at the contents of dev_setup and see if integrating there makes more sense for SLES and let us know what you think?

Thanks

Hristo Iliev

We are already working to port the Chef recipes to SuSE. Unfortunately the OSes that Chef supports are quite limited number and we may have some difficulties porting the existing code.

Hristo Iliev hsiliev closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 18, 2011
  1. Hristo Iliev

    Setup scripts for SLES11

    hsiliev authored
Commits on Aug 12, 2011
  1. Hristo Iliev

    nginx proxy support for uploading/downloading files.

    Tal Garfinkel authored hsiliev committed
    Change-Id: Iab9d86e0d102915d3f29dabe764bd4332747769a
  2. Hristo Iliev

    remove uploaded file after it has been packaged up -- eliminates reso…

    Tal Garfinkel authored hsiliev committed
    …urce leak.
    
    Change-Id: Ie27bd3ae0015bd3ad045414dc14bf060190ec2c7
  3. Hristo Iliev

    cleanup up temporary directory at startup to prevent persistent resou…

    Tal Garfinkel authored hsiliev committed
    …rce leaks.
    
    Change-Id: I95af33ddeec7961d3670b1563b574b887c58e75a
  4. Hristo Iliev

    Syncing java submodule with vcap-java's master branch

    Scott Andrews authored hsiliev committed
    Change-Id: Ia2f8802f7b5e1736ae1d196ca6cfaee2f2ca9de9
  5. Hristo Iliev

    added error logging for cloud errors and locking errors so we

    Tal Garfinkel authored hsiliev committed
    get a stack trace when these occur.
    
    Change-Id: Ibf99944804234ed6134d195971e70b98cd3d7dcb
  6. Hristo Iliev

    fixed small merge bug.

    Tal Garfinkel authored hsiliev committed
    Change-Id: I40a7dab19828ca58028499e936304f2370ac5374
  7. Hristo Iliev

    -added support for forcing droplet fetch over http.

    Tal Garfinkel authored hsiliev committed
    -minor style fix in dea.
    
    Change-Id: I512303687ae2254bc515f5996d1cc33d1ecbef69
  8. Hristo Iliev

    disable nginx front end for cloud_controller by default.

    Tal Garfinkel authored hsiliev committed
    Change-Id: I183b3f045a32d52c4e484e75987ec8b02ff90bac
  9. Hristo Iliev

    Fix router/dea unit tests

    mpage authored hsiliev committed
    Change-Id: I475d1f46a53a0a6a301a756d4a4867e664e6a9f4
  10. Hristo Iliev

    lock ruby 1.9.2 at p180

    Patrick Bozeman authored hsiliev committed
    Change-Id: I1c01e90e443c3d5bf051a370d0e0db936292bcfd
  11. andyl Hristo Iliev

    changed README.md to note VM memory requirements

    andyl authored hsiliev committed
    Change-Id: I91565d7e3c0a6ea9ab53007ac3146156857b5060
  12. xinli Hristo Iliev

    Install PostgreSQL as a service.

    xinli authored hsiliev committed
    Change-Id: I4ee9bf9fcb994702ab47abb428a62633db0e6c7c
  13. Hristo Iliev

    -support for downloading logfiles from dea using X-Acel redirect so n…

    Tal Garfinkel authored hsiliev committed
    …ginx
    
     does all the work.
    -fix for dea so that file viewer returns a proper error if a file
    doesn't exist instead of just dropping the connection.
    
    Change-Id: I4db50bf7cf0c0adf8cb30ef8f5943e5eb742bf80
  14. Hristo Iliev

    Fix & tests for bug when we have multiple DispatcherServlets in a Spr…

    AB Srinivasan authored hsiliev committed
    …ing app. See https://issuetracker.springsource.com/browse/CF-9.
    
    Change-Id: I8dc885b29f0f3b48d081d1952c04bb4e4d3678d7
  15. Mahesh Patil Hristo Iliev

    Chef scripts to deploy cloud foundry

    mahpat authored hsiliev committed
    This is part 1 of what I think will be a 3 part change. This change adds the
    basic chef recipes to deploy cloudfoundry on a single host. The major change is
    to install ruby1.8 and ruby1.9 into a configurable directory. As a result I
    added a wrapper script to invoke vcap start that sets up the ruby paths
    appropriately before starting indivdual components. Note, these changes do not
    download the vcap repo (I will add that in a later change).
    
    Most of the chef recipes were downloaded from the opscode website. Some of them
    have been modified to meet our requirements.
    
    Usage:
    1.  run dev_setup/bin/vcap_dev_setup to install all the components required
    by cloud foundry
    2.  run dev_setup/bin/vcap_dev {start, stop, restart} to start cloud foundry
    components.
    
    Testing: Installed a base Ubuntu image, ran bvts on cloud foundry installed
    using these new scripts.
    
    Change-Id: I22cf25131ae8f8ab725408521a44401578eceedd
  16. Hristo Iliev

    Add utility classes.

    mpage authored hsiliev committed
    This adds two classes: one for gathering process stats, and another
    for both chaining command execution and capturing stderr.
    
    Test plan:
    - Unit tests
    
    Change-Id: Iec73cf8731798e0b0b91cf3efaa4b3dfed2f1cd6
  17. Mahesh Patil Hristo Iliev

    Rewrite chef recipes from scratch.

    mahpat authored hsiliev committed
    Remove the stock recipes downloaded from opscode website. These were all
    written from scratch.
    
    Testing Done: BVT tests
    
    Change-Id: Ibf2cc130e1c80941173ceba3dd4d5574b20d7c14
  18. Martin Englund Hristo Iliev

    micro cloud foundry fix for cloud controller

    pmenglund authored hsiliev committed
    cloud_controller and dea can't use the same uid base,
    as they run on the same system
    
    Change-Id: Icc42369a3d42f834169c2bfa29abc25dad851364
  19. Hristo Iliev

    bump services submodule ptr

    Patrick Bozeman authored hsiliev committed
    Change-Id: If637c4fd054ac4e4d3d92aab461d51e4cbbb1b09
  20. Mahesh Patil Hristo Iliev

    Fix license headers

    mahpat authored hsiliev committed
    Change-Id: I0d0ff721fc180bc0650c65964557a435638f8c89
  21. Mahesh Patil Hristo Iliev

    More license fixes

    mahpat authored hsiliev committed
    Change-Id: I74502d897bce163486755662a39fc3ce733030f5
  22. Hristo Iliev

    replaced fast_uuid that uses rand with secure_uuid that uses

    Tal Garfinkel authored hsiliev committed
    /dev/urandom.
    
    Change-Id: Ic248cec9908accdd289b4172d2219ba6105056ee
  23. Hristo Iliev

    improved debugging for app change/update

    Patrick Bozeman authored hsiliev committed
    Change-Id: Icf17191eb86d49f738a332133d36de6f8b2c2071
  24. Hristo Iliev

    Make staging a blocking operation.

    Patrick Bozeman authored hsiliev committed
    The callers of app_manager#stage were written back before
    the cc was made async.  The callers assumed that the call to
    the stager was a blocking operation and start making other
    state modifications to the app immediately after calls
    to app_manger#stage.  This leads to races and the hm usually
    needs to get involved to fix things up, especially given
    that vmc jumps in and restarts apps after doing a service
    binding.
    
    Change-Id: Idd987b79b8d897a857912f764791af2219564b58
  25. Hristo Iliev

    Fix log file truncation bug in bin/vcap

    mpage authored hsiliev committed
    bin/vcap redirects stdout/stderr to a log file in /tmp/vcap-run if no log
    file is specified in a given component config. This file is not opened in append-mode,
    which causes attempts to truncate the temporary log file to fail. Fix this
    by opening the file in append-mode and immediately truncating it, thus preserving the
    original semantics.
    
    Test plan:
    
    Started vcap locally, truncated a temporary log file, made sure that the
    correct size was reflected.
    
    Change-Id: I5c07db56fb9801c08e6fab6ef2d15068fd3cf826
  26. Hristo Iliev

    ensure things still work if nginx: section not present in

    Tal Garfinkel authored hsiliev committed
    cloud_controller.yml.
    
    Change-Id: I81d96a44ed431a8b8ad661f966c0aa3156a7bf00
  27. Josh Valdez Hristo Iliev

    Added logging for user auth failures

    jmvldz authored hsiliev committed
    Change-Id: Ibd3fd37138a3868d30396866e53b76bb286e4a54
  28. Hristo Iliev

    Stager component skeleton

    mpage authored hsiliev committed
    This includes a basic gem skeleton that contains all of the staging code from the CC.
    Apart from some minor modifications to get this working without Rails, the code is unchanged.
    
    Test plan:
    
    - Supplied unit tests pass
    
    Change-Id: I65d55c686bed1f8d3301c91cd74ed857f3fd3aba
  29. Hristo Iliev

    Refactor stager tests

    mpage authored hsiliev committed
    Summary:
    - Fix the warning for multiple definitions of AUTOSTAGING_JAR
    - Move the embedded startup scripts into the fixture directory (lays the groundwork for fully staged droplets)
    - General code cleanup
    
    Test plan:
    - Unit tests still pass
    
    Change-Id: I00c8e6246608abc905f4add093592ab887154469
  30. Hristo Iliev

    Add helper class for loading/validating config files

    mpage authored hsiliev committed
    This adds a tiny utility class that leverages json_schema to declaratively validate and load
    config files. Over time, I'm imagining that we'll migrate all components over to this. Also,
    reorganize the common spec directory to be more in line with other spec dirs (functional, unit, fixtures sub directories).
    
    Test plan:
    - Ran unit tests
    
    Change-Id: Ib828c1d0ec4edb92c6f2ebe91ab68c36255ef148
  31. Mahesh Patil Hristo Iliev

    Templates for CF config files. Also change deployment config from jso…

    mahpat authored hsiliev committed
    …n to yml.
    
    Added template files for all cf components including services.
    Add comments to the deployment yaml config file. Cleanup some of the scripts.
    
    Change-Id: I9209749ab9ca50a2bd894189c571e1b4c33bc77b
  32. Hristo Iliev

    Fix require order bug in DEA tests.

    mpage authored hsiliev committed
    Test plan:
    - Ran tests
    
    Change-Id: Ie1594996842e27571c4bc478bb5733e091da5288
  33. Hristo Iliev

    advance tests submodule ptr

    Patrick Bozeman authored hsiliev committed
    Change-Id: I6f4916cafb6e0041e941e334b8883b1ac29dcaac
  34. Ramnivas Laddad Hristo Iliev

    Moved java submodule forward

    ramnivas authored hsiliev committed
    Change-Id: If33e5c9865e3fd79546642c26754b0414691dc87
  35. Hristo Iliev

    advance tests submodule ptr

    Patrick Bozeman authored hsiliev committed
    Change-Id: I716aefa2264def94e785f8dd60ac6db57f7809c4
  36. Hristo Iliev
  37. Hristo Iliev

    Removed SAP specific no-hosts

    hsiliev authored
Something went wrong with that request. Please try again.