"Fossies" - the Fresh Open Source Software Archive

Member "monasca-log-api-2.9.0/devstack/Vagrantfile" (1 Apr 2019, 4484 Bytes) of package /linux/misc/openstack/monasca-log-api-2.9.0.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Vagrantfile": 2.7.0_vs_2.9.0.

    1 require 'vagrant.rb'
    2 Vagrant.configure(2) do |config|
    3 
    4   config.cache.scope = :box if Vagrant.has_plugin?("vagrant-cachier")
    5   config.timezone.value = :host if Vagrant.has_plugin?('vagrant-timezone')
    6   if Vagrant.has_plugin?('vagrant-proxyconf')
    7     config.proxy.http = ENV['http_proxy'] if ENV['http_proxy']
    8     config.proxy.https = ENV['https_proxy'] if ENV['https_proxy']
    9     if ENV['no_proxy']
   10         local_no_proxy = ",192.168.10.6,10.0.2.15"
   11         config.proxy.no_proxy = ENV['no_proxy'] + local_no_proxy
   12     end
   13   end
   14 
   15   config.ssh.forward_agent = true
   16 
   17   config.vm.hostname = "devstack"
   18   config.vm.box = "bento/ubuntu-18.04"
   19   config.vm.network "private_network",ip:"192.168.10.6"
   20   config.vm.synced_folder "~/", "/vagrant_home"
   21   config.vm.provider "virtualbox" do |vb|
   22     vb.gui = false
   23     vb.memory = "12800"
   24     vb.cpus = 4
   25   end
   26 
   27   config.vm.provision "shell", privileged: false, inline: <<-SHELL
   28     sudo apt-get -y install git
   29 
   30     if [ $http_proxy ]; then
   31       git config --global url.https://git.openstack.org/.insteadOf https://git.openstack.org/
   32       sudo git config --global url.https://git.openstack.org/.insteadOf https://git.openstack.org/
   33 
   34       protocol=`echo $http_proxy | awk -F: '{print $1}'`
   35       host=`echo $http_proxy | awk -F/ '{print $3}' | awk -F: '{print $1}'`
   36       port=`echo $http_proxy | awk -F/ '{print $3}' | awk -F: '{print $2}'`
   37 
   38       echo "<settings>
   39               <proxies>
   40                   <proxy>
   41                       <id>$host</id>
   42                       <active>true</active>
   43                       <protocol>$protocol</protocol>
   44                       <host>$host</host>
   45                       <port>$port</port>
   46                   </proxy>
   47               </proxies>
   48              </settings>" > ./maven_proxy_settings.xml
   49 
   50       mkdir ~/.m2
   51       cp ./maven_proxy_settings.xml ~/.m2/settings.xml
   52 
   53       sudo mkdir /root/.m2
   54       sudo cp ./maven_proxy_settings.xml /root/.m2/settings.xml
   55     fi
   56 
   57     git clone https://git.openstack.org/openstack-dev/devstack --branch master --depth 1
   58     cd devstack
   59     echo '[[local|localrc]]
   60 
   61 GIT_DEPTH=1
   62 DEST=/opt/stack
   63 USE_VENV=False
   64 
   65 SERVICE_HOST=192.168.10.6
   66 HOST_IP=192.168.10.6
   67 DATABASE_HOST=192.168.10.6
   68 MYSQL_HOST=192.168.10.6
   69 HOST_IP_IFACE=eth1
   70 
   71 MYSQL_PASSWORD=secretmysql
   72 DATABASE_PASSWORD=secretdatabase
   73 RABBIT_PASSWORD=secretrabbit
   74 ADMIN_PASSWORD=secretadmin
   75 SERVICE_PASSWORD=secretservice
   76 
   77 LOGFILE=$DEST/logs/stack.sh.log
   78 LOGDIR=$DEST/logs
   79 LOG_COLOR=False
   80 
   81 disable_all_services
   82 enable_service zookeeper rabbit mysql key tempest horizon
   83 
   84 # Enable more OpenStack services if neccessary:
   85 # https://github.com/openstack-dev/devstack/blob/master/stackrc#L56-L81
   86 # Nova - services to support libvirt based openstack clouds
   87 # enable_service n-api n-cpu n-cond n-sch n-novnc n-cauth n-api-meta
   88 # Placement and Glance services needed for Nova
   89 # enable_service placement-api placement-client
   90 # enable_service g-api g-reg
   91 # Cinder, Neutron
   92 # enable_service cinder c-api c-vol c-sch c-bak
   93 # enable_service neutron q-svc q-agt q-dhcp q-meta q-l3
   94 
   95 # The following two variables allow switching between Java and Python for the implementations
   96 # of the Monasca API and the Monasca Persister. If these variables are not set, then the
   97 # default is to install the Python implementations of both the Monasca API and the Monasca Persister.
   98 
   99 # Uncomment one of the following two lines to choose Java or Python for the Monasca API.
  100 # MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-java}
  101 MONASCA_API_IMPLEMENTATION_LANG=${MONASCA_API_IMPLEMENTATION_LANG:-python}
  102 
  103 # Uncomment one of the following two lines to choose Java or Python for the Monasca Pesister.
  104 # MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-java}
  105 MONASCA_PERSISTER_IMPLEMENTATION_LANG=${MONASCA_PERSISTER_IMPLEMENTATION_LANG:-python}
  106 
  107 # Uncomment one of the following two lines to choose either InfluxDB or Vertica.
  108 # MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-vertica}
  109 # MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-cassandra}
  110 MONASCA_METRICS_DB=${MONASCA_METRICS_DB:-influxdb}
  111 
  112 # Uncomment following line to deploy monasca-log-api with Apache
  113 # MONASCA_LOG_API_USE_MOD_WSGI=True
  114 
  115 # Uncomment one of the following lines and modify accordingly to enable the Monasca DevStack Plugin
  116 enable_plugin monasca-api https://git.openstack.org/openstack/monasca-api.git
  117 enable_plugin monasca-log-api https://git.openstack.org/openstack/monasca-log-api.git
  118 
  119 ' > local.conf
  120     ./stack.sh
  121   SHELL
  122 
  123 end