gaotu
gaotu

Reputation: 21

dcos install package to local universe

I have a DC/OS cluster running a local instance of 'universe'. What is the specific procedure for adding custom packages to a local 'universe'? The only documentation I have found so far (which is very limited), is related to adding packages to the global universe repo. While this is great for the DC/OS community, it does not help in regards to maintaining private universes and repos.

The only procedures I found say:

1-Create a fork of the public universe repo: https://github.com/mesosphere/universe

2-Creating a custom package and then resubmitting it back to the community.

This is not exactly what I was expecting to see. I was hoping for a simple local package creation process. Is there such a thing?

Thanks,

GAOTU

Upvotes: 2

Views: 1190

Answers (2)

Abhijeet Jadhav
Abhijeet Jadhav

Reputation: 347

  1. Fork this universe repo and clone the fork:

    git clone https://github.com/<user>/universe.git /path/to/universe
    
  2. Add your package to the repo in right folder. Write the necessary markup files (config.json, marathon.json.mustache, resource.json, package.json etc.)

  3. Run the verification and build script to validate and build the Universe artifacts:

    scripts/build.sh
    

    This verifies the syntax of the files you added.

  4. Build the Universe Server Docker image:

    DOCKER_TAG="my-package" docker/server/build.bash
    

    This will create your docker image of local universe(ngnix server) and marathon.json to start the universe server.

  5. Run Universe Server

    dcos marathon app add marathon.json
    
  6. Point DC/OS to local universe server

    dcos package repo add --index=0 dev-universe http://universe.marathon.mesos:8085/repo
    
  7. Install your newly added package in DC/OS cluster

    dcos package install new_package
    

Upvotes: 2

js84
js84

Reputation: 3716

Do you want to add the package to your local universe, correct (i.e., not the mesosphere universe)?

In this case, after creating your custom package (and yes, there should be better documentation...) you can add this local/custom universe to a DC/OS cluster: https://dcos.io/docs/1.7/usage/repo/#adding

In general, you don't even have to fork the universe: a package repo is basically a simple folder structure. Check out the universe_builder.py here : It build a zip file, uploads it to S3, which you can then add as a new package repository as described above (and as output by the script).

In general feel to contribute and help to help improve the documentation!

Upvotes: 0

Related Questions