Ask Your Question

serranossi94's profile - activity

2018-05-14 06:01:05 -0500 received badge  Notable Question (source)
2017-02-01 15:10:40 -0500 received badge  Popular Question (source)
2016-12-06 18:47:56 -0500 received badge  Famous Question (source)
2016-10-07 11:06:13 -0500 asked a question Get services endpoints with REST API

Hello guys,

I'm trying to develop an app that uses some of the OpenStack services, so I want it to discover the list of endpoints available. To achieve this, I tried with my own account (not admin) to get them, but it says I'm not allowed. Can someone explain me why this error appears if the endpoint list is available through horizon?

curl -i -g -H 'X-Auth-Token: my-token' http://serveraddress:5000/v3/endpoints

Date: Fri, 07 Oct 2016 15:56:39 GMT
Server: Apache/2.4.7 (Ubuntu)
Vary: X-Auth-Token
X-Distribution: Ubuntu
x-openstack-request-id: req-5ce0ab5c-aa3a-49fc-96cf-9987f8c58aa0
Content-Length: 139
Content-Type: application/json

{"error": {"message": "You are not authorized to perform the requested action: identity:list_services", "code": 403, "title": "Forbidden"}}

Thanks in advance.

2016-09-16 08:51:41 -0500 received badge  Famous Question (source)
2016-08-08 03:44:38 -0500 received badge  Notable Question (source)
2016-06-13 06:07:30 -0500 received badge  Scholar (source)
2016-05-19 13:36:00 -0500 received badge  Notable Question (source)
2016-05-13 09:20:32 -0500 received badge  Popular Question (source)
2016-05-13 03:03:52 -0500 commented question Running my own Java app at startup with Heat template

I haven't started jet with Java EE. My app is a server developed with Java SE and Restlet FrameWork. I'll have to find a way to port it, but anyway, thanks.

2016-05-12 05:42:02 -0500 asked a question Running my own Java app at startup with Heat template

I am developing a cloud-based service and I'd like to automatize it as much as I can. So, I've created my own image with all the software required, including Java. The stand-alone program works perfectly, so I'm now writing a HOT template to create everything at once.

Right now, I'm testing with some pretty simple templates to see if it actually works. However, although my script runs, it doesn't keep my Java program running.

Can someone explain me how to achieve this? I have tried to run the program with nohup in case it was close when cloud-init finished, as well as running as a regular user of the instance.

I attach the test template I'm actually using

heat_template_version: 2015-04-30

description: Definition of the server configuration

parameters:
  flavor:
    type: string
    label: Flavor used by the instances
    description: Flavor used by the instances
  key:
    type: string
    label: SSH key
    description: SSH key
  private_network:
    type: string
    label: Network to connect the instances
    description: Network to connect the instances

resources:
  server:
    type: OS::Nova::Server
    properties:
        image: dnse3-0504
        key_name: {get_param: key}
        flavor: {get_param: flavor}
        networks:
          - network: {get_param: private_network}
        user_data: |
            #!/bin/bash
            echo "Running Server"
            cd /home/user/
            echo $(pwd)
            su ubuntu
            nohup java -jar /home/user/myapp.jar > output.log &
            echo "Server booted"
        user_data_format: RAW
2016-02-22 05:01:59 -0500 answered a question How to create new meter in Ceilometer

Hi,

You should try to check out the admin guide:

http://docs.openstack.org/admin-guide-cloud/telemetry-data-collection.html#meter-definitions

If you don't find the file meter.yaml, try with meters.yaml.

2016-02-09 05:15:30 -0500 received badge  Popular Question (source)
2015-12-17 05:36:16 -0500 received badge  Enthusiast
2015-12-10 20:57:44 -0500 asked a question Receiving OK from alarm_url of ScalingPolicy but no instance is created/removed

I'm practising with some Heat templates and I was trying to scale the AutoScalingGroup manually by sending a POST to the alarm_url of the proper ScalingPolicy. The problem is that I actually receive a 200 OK response from de server but there is no change in the group.

Here is the template I'm using

heat_template_version: 2015-10-15

description: Test with AutoScalingGroup

parameters:
    image:
        type: string
        label: Image used by the instances
        description: Image used by the instances
    flavor:
        type: string
        label: Flavor used by the instances
        description: Flavor used by the instances
    key:
        type: string
        label: SSH key
        description: SSH key
    private_network:
        type: string
        label: Network to connect the instances
        description: Network to connect the instances

resources:
    instance_group:
        type: OS::Heat::AutoScalingGroup
        properties:
            min_size: 1
            max_size: 4
            desired_capacity: 2
            cooldown: 60
            resource:
                type: OS::Nova::Server
                properties:
                    image: {get_param: image}
                    key_name: {get_param: key}
                    flavor: {get_param: flavor}
                    networks:
                        - network: {get_param: private_network}

    scale_up:
        type: OS::Heat::ScalingPolicy
        properties:
            adjustment_type: change_in_capacity
            auto_scaling_group_id: {get_resource: instance_group}
            scaling_adjustment: 1

    scale_down:
        type: OS::Heat::ScalingPolicy
        properties:
            adjustment_type: change_in_capacity
            auto_scaling_group_id: {get_resource: instance_group}
            scaling_adjustment: '-1'

outputs:
    scale_up_url:
        description: Webhook of the Scaling Up Policy
        value: {get_attr: [scale_up, alarm_url]}
    scale_down_url:
        description: Webhook of the Scaling Down Policy
        value: {get_attr: [scale_down, alarm_url]}