Cloudify CLI installation in Python3

133 views
Skip to first unread message

Dinesh Kumar

unread,
Jun 22, 2020, 10:16:38 AM6/22/20
to cloudif...@googlegroups.com
Hi All,
Since python2.7 is outdated, I tried to use python3.6 to install the cloudify CLI. I see the repositories are not still completely supported for python3.6, so I am getting following errors regarding syntax error. Anyone faced a similar issue and any way to resolve it. 

Cloudify CLI is completely installed with the "cloudify==20.03.03", is it enough to start use the "cfy" commands? or it depends on the other packages cloudify-common, cloudify-plugins-common and cloudify-dsl-parser too.

> pip3 install cloudify==20.03.03
> pip3 install cloudify-common==5.0.5.1
> pip3 install cloudify-dsl-parser==4.3.3
Collecting cloudify-dsl-parser==4.3.3
  Using cached https://files.pythonhosted.org/packages/da/1c/23b2c52422aeea60dda767b8ed904e3f67feb684667d2c06ca52d72b61eb/cloudify-dsl-parser-4.3.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-j_oai209/cloudify-dsl-parser/setup.py", line 29
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-j_oai209/cloudify-dsl-parser/
> cfy -h
Traceback (most recent call last):
  File ProgrammingEnvironment/python3_6_venv_cloudify_custom#/bin/cfy", line 7, in <module>
    from cloudify_cli.main import _cfy
  File ProgrammingEnvironment/python3_6_venv_cloudify_custom#/lib/python3.6/site-packages/cloudify_cli/main.py", line 18, in <module>
    from .cli import cfy
  File ProgrammingEnvironment/python3_6_venv_cloudify_custom#/lib/python3.6/site-packages/cloudify_cli/cli/cfy.py", line 21, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'


Regards

Dineshkumar RAJAGOPAL



Thilaga Kumaran Srinivasan

unread,
Jan 30, 2021, 2:04:41 AM1/30/21
to cloudify-users
I am struck with same issue too.

"The StringIO and cStringIO modules are gone. Instead, import the io module and use io.StringIO or io.BytesIO for text and data respectively."

Did cloudify release a python3 version of CLI?

Regards
Thilaga

ilan....@cloudify.co

unread,
Jan 31, 2021, 4:04:29 PM1/31/21
to cloudify-users
Hi Thilaga, 

The latest version of Cloudify 5.1.x fully supports Python3. From your question I think you are working with an older version. 

Please let me know if that is the case. 

Thilaga Kumaran Srinivasan

unread,
Feb 1, 2021, 11:19:00 AM2/1/21
to ilan....@cloudify.co, cloudify-users
Hi,

Thank you for your reply.


I may need another help. I just tried cloudify manager RPM and was able to bring up the admin portal. When I tried using one of the sample blueprints to deploy Azure resources,it said my client id/secrets, subscription ids, do not belong to this tenant id. I am not sure what it means since all my credentials are valid. Please let me know if you can help me with this issue.

Regards
Thilaga

--
You received this message because you are subscribed to a topic in the Google Groups "cloudify-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cloudify-users/rMyw6efCfjs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cloudify-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloudify-users/7e648946-09ec-4c31-9874-de4c33993ab0n%40googlegroups.com.

ilan....@cloudify.co

unread,
Feb 1, 2021, 12:42:37 PM2/1/21
to cloudify-users
Hi Thilaga, 

I sent you an email as well, so that I can help. But in general you are using a deprecated method which is probably the main reason it didn't work.

I sent you the updated and straightforward way to download Cloudify with a RPM, which can get you on the right track. 

Thanks

Thilaga Kumaran Srinivasan

unread,
Feb 1, 2021, 3:19:15 PM2/1/21
to ilan....@cloudify.co, cloudify-users
Hi,

Thank you for your help. I was able to setup cloudify manager in my Azure VM and upload the sample blueprint. There is a contest in my team to showcase GEO failover in Azure cloud using Azure Traffic manager and I am interested to show that cloudify can do the job nicely. Though I just started with Cloudify a couple days ago and I have just a day to show the demo. Is there something you can help me with?

Regards
Thilaga

ilan....@cloudify.co

unread,
Feb 1, 2021, 4:14:54 PM2/1/21
to cloudify-users
Hi Thilaga, 

Good to hear that the advice helped. 

I can recommend you to check out this blog post that we leverage through Cloudify Azure ARM templates to automate Azure vWAN:
https://shayn-71079.medium.com/azure-vwan-orchestration-made-simple-59b7f3fe0fce

Some of the relevant blueprints can be found here - https://github.com/shayn1234/Azure-vWAN
I'm sure that you can take the same idea for traffic management and creating a automated workflow for this. 

HTH and good luck. I'm happy to chat more and connect regarding Cloudify.

Thilaga Kumaran Srinivasan

unread,
Feb 10, 2021, 8:59:07 PM2/10/21
to cloudify-users
Hi,

Thank you. I hit a roadblock with an issue that when I try creating the deployment during the blueprint upload always I get the error message saying "cloudify required secrets [hkljkl-dsfds8989......] don't exist in this tenant". I have no clue what it is and find no option for tenant configuration. Please let me know is that something I can manage using config.yaml.

Regards
Thilaga

ilan....@cloudify.co

unread,
Feb 11, 2021, 3:38:41 AM2/11/21
to cloudify-users
Hi Thilaga, 

Did you upload the necessary secrets to the secret store for this tenant? i.e to create a deployment from that blueprint on Azure on that tenant you need to have the Azure plugin, as well as the necessary Azure secrets credentials created. 

HTH, 

Thilaga Kumaran Srinivasan

unread,
Feb 11, 2021, 12:33:15 PM2/11/21
to ilan....@cloudify.co, cloudify-users
Thank you. This solved the problem. I need one more help.

The goal of my project is that I need to use Cloudify manager to manage everything for my cloud operation but I have my own validation workflow with REST API enabled and Terraform plus Ansible for provisioning and configurations. So will I be able to integrate the Cloudify manager (community version) with my validation service and upon successful validation, can Cloudify manager execute Terraform/Ansible scripts for me?

Regards
Thilaga

ilan....@cloudify.co

unread,
Feb 11, 2021, 1:13:16 PM2/11/21
to cloudify-users
Hi Thilaga, 

Happy to hear that it worked. 

Regarding the second issue, absolutely. This is what the idea of the Cloudify Orchestrator of Orchestrators means, to be able to interact with other automation tools like Ansible, Terraform, and other REST API calls that you may have built. 

You can read more about these plugins, and then upload them to you manager and use them:

Thilaga Kumaran Srinivasan

unread,
Feb 11, 2021, 9:16:29 PM2/11/21
to ilan....@cloudify.co, cloudify-users
Thank you. Let me try them and let you know if anything.

Regards
Thilaga

Reply all
Reply to author
Forward
0 new messages