Cloudify 3.3 - Openstack:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed - openstack

I'm trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection.
When I execute the command:
cfy bootstrap --install-plugins -p /path/to/manager/blueprint/file -i /path/to/inputs/yaml/file
I receive the following error:
raise exceptions.SslCertificateValidationError(reason=e)
SslCertificateValidationError: SSL certificate validation has failed: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
2016-01-29 09:50:58 CFY [external_network_5bbde.creation] Task failed 'neutron_plugin.network.creation_validation' -> SSL certificate validation has failed: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed [attempt 1/6]
What should I do to solve the problem?

It seems that you have a problem with the keystone SSL certificate.
You should either import the certificate to your CLI machine.
Or you could try before bootstrap to run:
export CLOUDIFY_SSL_TRUST_ALL=true;

I solved inserting, into the dsl_definition of the OpenStack blueprint:
dsl_definitions:
openstack_configuration: &openstack_configuration
username: { get_input: keystone_username }
password: { get_input: keystone_password }
tenant_name: { get_input: keystone_tenant_name }
auth_url: { get_input: keystone_url }
region: { get_input: region }
nova_url: { get_input: nova_url }
neutron_url: { get_input: neutron_url }
the following statement:
custom_configuration:
nova_client:
insecure: true
keystone_client:
insecure: true
neutron_client:
insecure: true
cinder_client:
insecure: true
so that the final result was:
dsl_definitions:
openstack_configuration: &openstack_configuration
username: { get_input: keystone_username }
password: { get_input: keystone_password }
tenant_name: { get_input: keystone_tenant_name }
auth_url: { get_input: keystone_url }
region: { get_input: region }
nova_url: { get_input: nova_url }
neutron_url: { get_input: neutron_url }
custom_configuration:
nova_client:
insecure: true
keystone_client:
insecure: true
neutron_client:
insecure: true
cinder_client:
insecure: true

Related

Sequelize migration & seeder issue. ERROR: Unable to resolve the storage: It can also be referred to for how we can setup password protected sqlite

I am getting ERROR: Unable to resolve the storage: when running sequelize seeder. Although I was able to run migrations (to create, update tables).
Following is my config file
module.exports = {
development: {
dialect: 'sqlite',
storage: 'path-to-db',
seederStorage: 'path-to-db',
password: 'some-private-key-to-make-db-password-protected',
dialectModulePath: '#journeyapps/sqlcipher',
dialectOptions: {
options: {
encrypt: true,
},
},
},
staging: { .. //and so on
production: { .. //and so on
I got the issue what I was doing wrong.
Notice
storage: 'path-to-db',
We need to pass 'sequelize here
storage: 'sequelize'
Will work like a charm

How to verify polygon smart contract using truffle?

I deployed a simple NFT smart contract on polygon mumbai testnet but when I am trying to verify it then It is showing an error. please guide me how to verify it...
This is the error which I am getting
PS C:\Users\Sumits\Desktop\truffle> truffle run verify MyNFT --network matic --debug
DEBUG logging is turned ON
Running truffle-plugin-verify v0.5.20
Retrieving network's chain ID
Verifying MyNFT
Reading artifact file at C:\Users\Sumits\Desktop\truffle\build\contracts\MyNFT.json
Failed to verify 1 contract(s): MyNFT
PS C:\Users\Sumits\Desktop\truffle>
This is my truffle-config.js
const HDWalletProvider = require('#truffle/hdwallet-provider');
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
matic: {
provider: () => new HDWalletProvider(mnemonic, `https://rpc-mumbai.maticvigil.com`),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
version: "^0.8.0",
}
},
plugins: ['truffle-plugin-verify'],
api_keys: {
polygonscan: 'BTWY55K812M*******WM9NAAQP1H3'
}
}
First deploy the contract:
truffle migrate --network matic --reset
I am not sure if you successfully deploy it to matic network, because your configuration does not seem to be correct:
matic: {
// make sure you set up provider correct
provider: () => new HDWalletProvider(mnemonic, `https://rpc-mumbai.maticvigil.com/v1/YOURPROJECTID`),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
Then verify.
truffle run verify ContractName --network matic
ContractName should be the name of the contract, not the name of the file
please make sure you are putting the polygonscan api key in lowercase

openstack heat doesn't recognize key_name parameter

hy
i have an openstack deployed on my laptop. i'm trying to create a stack with heat.
i have created a keypair openstack keypair create heat_key > heat_key.priv
which is recognized by nova nova keypair-list give the following output :
+----------+------+-------------------------------------------------+
| Name | Type | Fingerprint |
+----------+------+-------------------------------------------------+
| heat_key | ssh | 0b:7a:36:20:e2:e3:19:3b:ab:a1:95:ac:67:41:67:d7 |
+----------+------+-------------------------------------------------+
this is my simple HOT template :
heat_template_version: 2013-05-23
description: Hot Template to deploy a single server
parameters:
image_id:
type: string
description: Image ID
key_name:
type: string
description: name of keypair to enable ssh to the instance
resources:
test_stack:
type: OS::Nova::Server
properties:
name: "test_stack"
image: { get_param: image_id }
flavor: "ds1G"
key_name:{ get_param: key_name }
outputs:
test_stack_ip:
description: IP of the server
value: { get_attr: [ test_stack, first_address ] }
when i try to create the stack
openstack stack create -t myTemp.hot --parameter key_name=heat_key --parameter image_id=trusty-server-cloudimg-amd64-disk1 test_stack
i get the following error
ERROR: Property error: : resources.test_stack.properties: : Unknown Property key_name:{ get_param
i have tried with different versions of templates but i get the same error
any idea why this is happening?
WORST part about the YAML file is, it is SPACE sensitive, so we need to be really careful while editing or copying conetent of HEAT templete. There is no space between "key_name" and "{" which is why it is failing.
key_name:{ get_param: key_pair_name }
Just put an extra space between these and it will work. I tested it :-)
key_name: { get_param: key_pair_name }
I was able to do it by providing the details in parameters . PFB Sample script which worked for me.
heat_template_version: 2016-10-14
description: Admin VM - Test Heat
parameters:
image_name_1:
type: string
label: Centos-7.0
description: Centos Linux 7.0
default: Centos-7.0
network_id_E1:
type: string
label: 58e867ce-841c-48cf-8116-e72d998dbc89
description: Admin External Network
default: Admin
network_id_E1:
type: string
label: 4f69c8e5-8f52-4804-89e0-2c8232f9f3aa
description: Internal-1 Network
default: SR-IOV Interface
network_id_I2:
type: string
label: 28120cdb-7e8b-4e8b-821f-7c7d8df37c1d
description: Internal-2 Network
default: Internal-2
KeyName:
type: string
default: IO_Perf_Cnt
description: Name of an existing key pair to use for the instance
constraints:
- custom_constraint: nova.keypair
description: Must name a public key (pair) known to Nova
resources:
AdminVM1:
type: OS::Nova::Server
properties:
availability_zone: naz3
image: { get_param: image_name_1 }
flavor: 4vcpu_8192MBmem_40GBdisk
key_name: { get_param: KeyName }
networks:
- network: { get_param : network_id_E1 }
Try to change the parameter name key_name to some other name and execute it
heat_template_version: 2015-10-15
description: Hot Template to deploy a single server
parameters:
image_id:
type: string
description: Image ID
key_pair_name:
type: string
description: name of keypair to enable ssh to the instance
resources:
test_stack:
type: OS::Nova::Server
properties:
name: "test_stack"
image: { get_param: image_id }
flavor: "ds1G"
key_name: { get_param: key_pair_name }
outputs:
test_stack_ip:
description: IP of the server
value: { get_attr: [ test_stack, first_address ] }

Meteor Up - Error: connect ECONNREFUSED 192.168.100.12:

I have a Meteor App based on Angular 1.3 + Meteor 1.5.2.2.
I am using Ubuntu 17.
I am trying to deploy my Meteor App on local machine first before going for live server using Meteor Up.
But I am facing this issue when running mup setup command
martinihenry#martinihenry:~/mytestapp-prod/.deploy$ mup setup
Started TaskList: Setup Docker
[192.168.100.12] - Setup Docker
events.js:141
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 192.168.100.12:22
at Object.exports._errnoException (util.js:907:11)
at exports._exceptionWithHostPort (util.js:930:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1078:14)
Here is my mup.json:
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: '192.168.100.12',
username: 'root',
// pem: './path/to/pem'
// password: 'server-password'
// or neither for authenticate from ssh-agent
}
},
app: {
// TODO: change app name and path
name: 'mytestapp-prod',
path: '../',
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: '192.168.100.12:3000',
MONGO_URL: 'mongodb://localhost/meteor',
},
// ssl: { // (optional)
// // Enables let's encrypt (optional)
// autogenerate: {
// email: 'email.address#domain.com',
// // comma separated list of domains
// domains: 'website.com,www.website.com'
// }
// },
docker: {
// change to 'kadirahq/meteord' if your app is using Meteor 1.3 or older
image: 'abernix/meteord:base',
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
}
};
What could be wrong here?
It looks like you don't have sshd running on your machine, or you have not enabled remote ssh access for root.
You need to edit /etc/ssh/sshd_config, and comment out the following line:
PermitRootLogin without-password
Just below it, add the following line:
PermitRootLogin yes
Then restart SSH:
service ssh restart
I know this is late, but this a known and reproducable bug resulting from inotfiy-watch using all of the available slots for watches, and while very misleading, it actually has absolutely nothing to do with disk space.
The easy fix? increase watch slots:
sudo -i
echo 1048576 > /proc/sys/fs/inotify/max_user_watches
exit

Integrating cloudify with openstack nova-network

Integrating cloudify with openstack nova-network, if nova-network dosn't support floating-ip, how to define the openstack-nova-net-manager-blueprint.yaml?
1.cloudify-manager-blueprints version: cloudify-manager-blueprints-3.2.1
https://github.com/cloudify-cosmo/cloudify-manager-blueprints/tree/3.2.1-build
2.the blueprint DSL like this:
enter image description here
how to solve this problem? thanks for your kindly help!
The floating IP is used to connect to the manager once it has been already bootstrapped.
In case you do not have a floating IP, you can bypass it with one of two options:
Create manually an IP connected to the external network and use it as an external resource, so you it would look like:
manager_server_ip:
type: string
default: 1.1.1.1
manager_server:
type: cloudify.openstack.nodes.Server
properties:
resource_id: { get_input: manager_server_name }
manager_server_ip: { get_input: manager_server_ip }
install_agent: false
server:
image: { get_input: image_id }
flavor: { get_input: flavor_id }
openstack_config: { get_property: [openstack_configuration, openstack_config] }
relationships:
- target: management_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: management_keypair
type: cloudify.openstack.server_connected_to_keypair
Just create a regular IP on the some network that will let you connect the manager after bootstrap

Resources