Configuring and Customizing AppMarket
AppMarket requires:
<xterm> # gem install bundler </xterm>
<xterm> # cd /usr/lib/one/ruby/oneapps/market # bundle install </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
After installing the OpenNebulaApps the sunstone-server.conf and sunstone-views/admin.yaml are modified to include the following information:
:routes: - appmarket
apptools-appmarket-dashboard: panel_tabs: table_columns: actions: apptools-appmarket-appliances: panel_tabs: appmarket_info_tab: true table_columns: - 0 # Checkbox #- 1 # ID - 2 # Name - 3 # Publisher - 4 # Hypervisor - 5 # Arch - 6 # Format #- 7 # Tags actions: AppMarket.refresh: true AppMarket.import: true
To enable the appmarket tabs you have to add the following lines in the enabled_tabs section of the sunstone-views/admin.yaml.file
enabled_tabs: ... - apptools-appmarket-dashboard - apptools-appmarket-appliances
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