How to get the version of CloudStack through the API? - apache-cloudstack

I want to get the version of CloudStack through the API:
http://cloudstack.apache.org/docs/api/apidocs-4.4/TOC_Root_Admin.html
But I can't find any API command to get the CloudStack version.
How can I do it?
Thank in advance.

The listCapabilities API command will give you the version number of CloudStack.
Assuming you are running the management server on localhost:
http://localhost:8096/client/api?response=json&command=listCapabilities
Result:
{
"listcapabilitiesresponse" :
{
"capability" :
{
"securitygroupsenabled":false,
"cloudstackversion":"4.5.0-SNAPSHOT",
"userpublictemplateenabled":true,
"supportELB":"false",
"projectinviterequired":false,
"allowusercreateprojects":true,
"customdiskofferingminsize":1,
"customdiskofferingmaxsize":1024,
"regionsecondaryenabled":false,
"kvmsnapshotenabled":false
}
}
}

Related

How to specify the dotnet 6 runtime for aws lambda, using terraform?

I can deploy a dotnetcore3.1 runtime using this input in my terraform (executed from GitLab CI pipeline):
variable "runtime" {
type = string
default = "dotnetcore3.1"
}
After it deploys, I can manually change the runtime from .NET Core 3.1 to .NET 6:
But how do I specify .NET 6 in the terraform to begin with?
I have tried:
variable "runtime" {
type = string
default = "dotnet6"
}
But I get the following error in my pipeline:
Error: expected runtime to be one of [nodejs nodejs4.3 nodejs6.10 nodejs8.10 nodejs10.x nodejs12.x nodejs14.x java8 java8.al2 java11 python2.7 python3.6 python3.7 python3.8 dotnetcore1.0 dotnetcore2.0 dotnetcore2.1 dotnetcore3.1 nodejs4.3-edge go1.x ruby2.5 ruby2.7 provided provided.al2], got dotnet6
How does one select the .NET 6 runtime in TF?
It would seem that .NET 6 isn't supported via Terraform.
This is not entirely true, the AWS provider supports dotnet6 runtime, you just have to have a version of the provider has support for it.
Currently the latest version of the AWS provider is 4.27.0. The support for dotnet6 was introduced around version 4.4.0. Adjusting the provider to have a version greater than 4.4.0 should be enough to have dotnet6 support.
So you would want to modify your required_providers block to something like this:
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">=4.4.0"
}
}
}
dotnet6 works just fine.
I suspect your TF version and/or AWS provider are out of date. I'm using dotnet6 for a lmabda just fine with the following..
"terraformVersions": {
"terraformMajorVersion": "1",
"providerVersions": {
"aws": "4.14.0",
}

Flyway Gradle Plugin with Cloud Spanner - No database found to handle url

I'm trying to setup Flyway for Google Cloud Spanner (beta) using the flyway gradle plugin but it gets the error below when executing ./gradlew flywayinfo.
> Error occured while executing flywayInfo
No database found to handle jdbc:cloudspanner:/projects/<my-project>/instances/<my-instance>/databases/<my-db>
build.gradle
plugins {
id 'java'
id 'org.flywaydb.flyway' version '7.13.0'
}
...
dependencies {
implementation(
'org.flywaydb:flyway-gcp-spanner:7.13.0-beta'
)
}
flyway {
url = 'jdbc:cloudspanner:/projects/<my-project>/instances/<my-instance>/databases/<my-db>'
}
The values in the url correspond to my project and instance names.
I've also tried:
using a service account key in the end of the URL
adding the com.google.cloud:google-cloud-spanner-jdbc:2.3.2 JDBC driver dependency (implementation)
I'm behind a proxy but I have set it in my gradle.properties with systemProp.http.proxyHost and systemProp.http.proxyPort (also for https)
Using Flyway CLI and the API programmatically works.
It seems like the error comes from flyway implementation here. Your issue seems somewhat similar with https://github.com/flyway/flyway/issues/3028.
Consider opening a new issue here: https://github.com/flyway/flyway/issues

how to boot from iso in openstack horizon

I'm trying to use horzon web page to build an instance from an ISO image, but it appears to show no disk in centos install configuration. while i choose to create new volume.
the general flow like below:
The test openstack invironment is built with devstack on the latest branch. I upload with a centos iso downloaded from http://mirrors.163.com/centos/7.6.1810/isos/x86_64/, i followed the original workflow provided by horizon. But it seems failed.
webpage send follow data to horizon server
{
"availability_zone":"nova",
"config_drive":false,
"user_data":"",
"disk_config":"AUTO",
"instance_count":1,
"name":"vm_boot_from_iso",
"scheduler_hints":{
},
"security_groups":[
"09f6bebe-3015-438d-8b4c-2d10b5d5998b"
],
"create_volume_default":true,
"hide_create_volume":false,
"source_id":null,
"block_device_mapping_v2":[
{
"source_type":"image",
"destination_type":"volume",
"delete_on_termination":true,
"uuid":"0e49cc7a-593c-4a62-a05f-bdef63157d22",
"boot_index":"0",
"volume_size":10
}
],
"flavor_id":"d2",
"nics":[
{
"net-id":"f9796914-00b5-4dfe-a7fa-4b2c1641d037",
"v4-fixed-ip":""
}
],
"key_name":null
}
I was expecting through the installation i could find the disk provided by the workflow.

berks-api will not run on ubuntu in azure - get Permission denied # rb_sysopen - /etc/chef/client.pem

As part of our chef infrastructure I'm trying to set up and configure a berks-api server. I have created an Ubuntu server in azure and i have bootstrapped it and it appears as a node in my chef-server.
I have followed the instructions at github - bekshelf-api installation to install the berks-api via a cookbook. I have run
sudo chef-client
on my node and the cookbook appears to have been run successfully.
The problem is that the berks-api doesn't appear to run. My Linux terminology isn't great so sorry if I'm making mistakes in what I say but it appears as if the berks-api service isn't able to run. If I navigate to /etc/service/berks-api and run this command
sudo berks-api
I get this error
I, [2015-07-23T11:56:37.490075 #16643] INFO -- : Cache manager starting...
I, [2015-07-23T11:56:37.491006 #16643] INFO -- : Cache Builder starting...
E, [2015-07-23T11:56:37.493137 #16643] ERROR -- : Actor crashed!
Errno::EACCES: Permission denied # rb_sysopen - /etc/chef/client.pem
/opt/berkshelf-api/v2.1.1/vendor/bundle/ruby/2.1.0/gems/ridley-4.1.2/lib/ridley/client.rb:144:in `read'
/opt/berkshelf-api/v2.1.1/vendor/bundle/ruby/2.1.0/gems/ridley-4.1.2/lib/ridley/client.rb:144:in `initialize'
If anyone could help me figure out what is going on, I'd really appreciate it. If you need to explain the setup any more let me know.
It turns out I misunderstood the configuration of the berks-api. I needed to get a new private key for my client (berkshelf) from manage.chef.io for our organization. I then needed to upload the new key (berkshelf.pem) to /etc/berkshelf/api-server and reconfigure the berks-api to use the new key. so my config for the berks-api now looks like below:
{
"home_path":"/etc/berkshelf/api-server",
"endpoints":[
{
"type":"chef_server",
"options":
{
"url":"https://api.opscode.com/organizations/my-organization",
"client_key":"/etc/berkshelf/api-server/berkshelf.pem",
"client_name":"berkshelf"
}
}
],
"build_interval":5.0
}
I couldn't upload berkshelf.pem directly to the target location, i had to upload it to my home location, then copy it from within linux.
Having done this, the service starts and works perfectly.

Issues with Artifactory after upgrade to 3.4

I followed the upgrade notes to upgrade from Artifactory 2.6.6 to 3.4.2, I reimported the artifacts but after that, artifact resolution often fails with 404.
Even previously deployed artifacts can not be resolved. The deploying Jenkins job runs fine, but when I open the URL from the log, I get that message:
{
"errors" : [ {
"status" : 404,
"message" : "Artifact not found: my/group/myapp/0.9.13-SNAPSHOT/myapp-0.9.13-SNAPSHOT.pom"
} ]
}
I also tried to export/import the whole system after upgrade, but nothing changed.
Does anyone know how to fix this?
I found out that the issue is related to the unique snapshot behaviour of Maven 3. In fact, there is no myapp-0.9.13-SNAPSHOT.pom, but one with a timestamp. The Rest API does not cover that and not all Jenkins plugins have support for that.

Resources