Configuring and Customizing AppMarket
AppMarket requires:
<xterm> # gem install bundler </xterm>
<xterm> # cd /usr/lib/one/ruby/oneapps/market # bundle install </xterm>
oneapps
packages. Make sure you uninstall them before following these instructions.
AppMarket can be download from the OpenNebula Downloads page in three formats:
The rpm and deb packages can be installed with dpkg
and rpm
respectively:
<xterm> # Debian/Ubuntu $ sudo dpkg -i appmarket_4.2.0.deb
# CentOS/openSUSE $ sudo rpm -i appmarket_4.2.0.rom </xterm>
If installing from source code, after unpacking the following needs to be run: <xterm> $ sudo ./install.sh </xterm>
The AppMarket configuration file can be found at /etc/one/appmarket-server.conf
. It uses YAML syntax and the following parameters can be configured in this file
AppMarket requires a MongoDB database to store the appliances and users metadata. For more information on how to install and configure MongoDB please use the official webpage.
The host and port where the MongoDB is running can be defined as follows:
# MongoDB endpoint db_host: localhost db_port: 27017
The host and port where the AppMarket server will run is defined as follows. By default the server runs locally in port 6242.
# Host and port where AppMarket server will run :host: 127.0.0.1 :port: 6242
The first time the AppMarket server is started, the DB will be initialized and an admin user will be created using the information provided in the appmarket-server.conf.
# Admin credentials. This will be the user that will be used in the # bootstrap process the first time the server is started user: organization: default first_name: default last_name: default username: default password: default website: default email: default
A mail service can be configured to send a notification to the user when her account is activated. By default this service is disabled.
# Parameters that will be used to configure the delivery method of the # mail service. More information: http://rubygems.org/gems/mail mail: :address: mail.default.com :port: 587 :domain: default.com :user_name: default@default.com :password: password :authentication: plain :enable_starttls_auto: false
You can customize the layout of your AppMarket deployment by editing the following files located in /usr/lib/one/ruby/oneapps/market/views/custom
banner.haml
footer.haml
logos.haml
terms_of_use.haml
tittle.haml
Example (logos.haml
):
%a.span4{'href' => "http://www.opennebula.org/"} %img{'src' => "/img/opennebula_gray.png"} %a.pull-right{'href' => "http://www.c12g.com/"} %img{'src' => "/img/c12g.png"}
To start and stop the server, use the appmarket-server start/stop
command:
<xterm> $ appmarket-server start appmarket-server started </xterm>
:host
attribute in /etc/one/appmarket-server.conf
to your server public IP, or 0.0.0.0 so appmarket will listen on any interface.
Inside /var/log/one/
you will find new log files for the server.
/var/log/one/appmarket-server.error /var/log/one/appmarket-server.log
The AppMarket tabs are not included in sunstone by default. To enable them, edit '/etc/one/sunstone-views.yaml' and include the AppMarket tabs
... available_tabs: - dashboard-tab ... - apptools-appmarket-dashboard - apptools-appmarket-appliances
Also edit '/etc/one/sunstone-views/admin.yaml' and '/etc/one/sunstone-views/user.yaml' and add the Appmarket tabs inside 'enabled_tabs':
enabled_tabs: dashboard-tab: true ... apptools-appmarket-dashboard: true apptools-appmarket-appliances: true
Be sure to restart Sunstone for the changes to take effect.
For more information on how to customize the views based on the user/group interacting with Sunstone check the sunstone views guide