I'm having a hard time to deploy this standard ecommerce project on Bluemix:
https://github.com/zallaricardo/ecommerce-devops
I've chosen to do it with git repository and automatic deploy through the Bluemix pipeline service. After successfully building and fixing a lot of misconfigurations, the root challenge seems to be write a correct version of the manifest.yml file for the project.
Without the manifest.yml file, the log shows the following error:
Downloading artifacts...DOWNLOAD SUCCESSFUL
Target: https://api.ng.bluemix.net
Updating app loja-virtual-devops in org pfc-devops / space Dev as [email account]...
OK
Uploading loja-virtual-devops...
Uploading app files from: /home/pipeline/d38f0184-33da-44da-ba16-4671b491988a
Uploading 384.1M, 1679 files
228.5M uploaded...
Done uploading
OK
Stopping app loja-virtual-devops in org pfc-devops / space Dev as [email account]...
OK
Starting app loja-virtual-devops in org pfc-devops / space Dev as[email account]...
-----> Downloaded app package (452M)
-----> Downloaded app buildpack cache (4.0K)
Staging failed: An application could not be detected by any available buildpack
FAILED
NoAppDetectedError
TIP: Buildpacks are detected when the "cf push" is executed from within the directory that contains the app source code.
Use 'cf buildpacks' to see a list of supported buildpacks.
Use 'cf logs loja-virtual-devops --recent' for more in depth log information.
And with the version of manifest which I believe * - I'm new on this manifests stuff* - to be ok and sufficient, the log shows:
Downloading artifacts...DOWNLOAD SUCCESSFUL
Target: https://api.ng.bluemix.net
FAILED
Error reading manifest file:
yaml: unmarshal errors:
line 2: cannot unmarshal !!seq into map[interface {}]interface {}
The manifest.yml file is currently written as follows:
---
- name: loja-virtual-devops
memory: 512M
buildpack: https://github.com/cloudfoundry/java-buildpack
domain: mybluemix.net
I'll sincerely appreciate any hint about how to fix the manifest for this application or another way to successfully deploy the project through Bluemix.
Try including the applications heading in your manifest.yml file.
example:
applications:
- name: appname
host: app_hostname
buildpack: java_buildpack
instances: 2
memory: 512M
disk_quota: 512M
path: .
Related
When trying to debug Service Fabric locally it fails during deployment:
1>------ Build started: Project: Project.TestServer.Contracts, Configuration: Debug Any CPU ------
1>Project.TestServer.Contracts -> D:\Projects\Project.Test\Project.TestServer.Contracts\bin\Debug\netstandard2.1\Project.TestServer.Contracts.dll
2>------ Build started: Project: Project.TestServer, Configuration: Debug Any CPU ------
2>Waiting for output folder cleanup...
2>Output folder cleanup has been completed.
2>Project.TestServer -> D:\Projects\Project.Test\Project.TestServer\bin\Debug\netcoreapp3.1\win7-x64\Project.TestServer.dll
2>Project.TestServer -> D:\Projects\Project.Test\Project.TestServer\bin\Debug\netcoreapp3.1\win7-x64\Project.TestServer.Views.dll
3>------ Build started: Project: Project.TestServer.ServiceFabric, Configuration: Debug x64 ------
4>------ Deploy started: Project: Project.TestServer.ServiceFabric, Configuration: Debug x64 ------
4>C:\ProgramData\Microsoft\Crypto\Keys\33c99d3358d005d142e356b6d*******_8f15e82c-1deb-4d62-b94a-196c3a******
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
What this line could mean?
C:\ProgramData\Microsoft\Crypto\Keys\33c99d3358d005d142e356b6d*******_8f15e82c-1deb-4d62-b94a-196c3a******
I had this same issue for the past day or so, and I was able to resolve the issue by searching my OS(C://) drive for the first part of the key name {first part}_{the rest}.
I found a copy/original key in "C:\Users\youruser\AppData\Roaming\Microsoft\Crypto\Keys" and copied it over to "C:\ProgramData\Microsoft\Crypto\Keys".
After doing this the app was able to run and deploy again on my local machine.
This solution by ravipal worked for me:
The issue is that the ASP.NET development certificate being imported to Local Computer was incomplete. We are working on addressing this issue in the VS Tooling. Meanwhile, please use the following workaround which is needed only once per machine.
Export the asp net development certificate
dotnet dev-certs https -ep "%TEMP%\aspcert.pfx" -p <password> (choose any password)
Launch local machine certificate manager
Import the certificate that was exported in step1 (%TEMP%\aspcert.pfx) to both 'Personal' and 'Trusted Root Certification Authorities' of Local Computer. Please use all the default options while importing the certificate.
Now the deployment of the SF application will work.
I've deployed nodejs based IBM cloud function using manifest file. I'll have few other functions which may share some common codes. Here is the folder structure
manifest.yml
actions/
- myFunction1/
-- index.js
-- package.json
- myFunction2/
-- index.js
-- package.json
- common/
-- utils.js
Here is my manifest.yml -
packages:
myfunctions:
version: 1.0
license: Apache-2.0
actions:
myFunction1:
function: actions/myFunction1
runtime: nodejs:10
include:
- ["actions/common/*.js", "./common/"]
myFunction2:
function: actions/myFunction2/index.js
runtime: nodejs:10
I deployed the functions using following command from cmd-
ibmcloud fn deploy --manifest manifest.yml
The deployment went successful, both functions are created. Second function(myFunction2) executes properly but the first function throws error when try to execute. Here is the error message -
{
"error": "Initialization has failed due to: There was an error uncompressing the action archive."
}
I even tried with the inclusion of the dependencies in manifest and codes but throws same error. I was following this article -
https://medium.com/openwhisk/whisk-deploy-zip-actions-with-include-exclude-30ba6d96ad8b
Still struggling, appreciate any help.
Thanks
Musa
I upgraded to Python 3.5 and Ansible deployment started failing, not sure if they are related, but here is the info:
Ansible version: 2.3.2
yaml file:
- name: Collect compiled DLLs for publishing
win_copy:
src: '{{ download_dir }}/tmp/xxxx/bin/Release/PublishOutput/bin/'
dest: '{{ work_dir }}\bin'
Error:
{
"failed": true,
"msg": "Unexpected failure during module execution.",
"stdout": ""
}
Upgrade to Ansible 2.5.1 to fix this issue.
Summary from the pull request:
When win_copy copies multiple files it can sometimes delete the local tmp folder that should be used by multiple modules. This means any further modules that need to access this local tmp folder will fail.
We never came across this in ansible-test as we ran a Python module on localhost which causes the ansiballz cache to stop win_copy from successfully deleting this folder.
We are trying to deploy application to Bluemix using the CF command cf push -f manifest.yml and below is the attached yml file
applications:
- name: service_name_v1.0
memory: 1GB
buildpack: liberty-for-java
instances: 1
path: /Users/admin/Apps/wlp-cb/usr/servers/defaultServer/defaultServer.zip
domains:
- my.bluemix.org
hosts:
- my-service-space
timeout: 180
DEA/2
Instance (index 0) failed to start accepting connections
May 4, 2017 10:10:55 AM
API/0
App instance exited with guid ae937fbe-d88f-48d5-b985-12b3b71b3b8c payload: {“cc_partition”=>”default”, “droplet”=>”ae937fbe-d88f-48d5-b985-12b3b71b3b8c”, “version”=>”94e28b95-27d3-4554-b99b-11d453f40e7f”, “instance”=>”9b723df2d462441caa352e3337b4e230”, “index”=>0, “reason”=>”CRASHED”, “exit_status”=>0, “exit_description”=>”failed to accept connections within health check timeout”, “crash_timestamp”=>1493917855}
May 4, 2017 10:10:55 AM
API/1
App instance exited with guid ae937fbe-d88f-48d5-b985-12b3b71b3b8c payload: {“cc_partition”=>”default”, “droplet”=>”ae937fbe-d88f-48d5-b985-12b3b71b3b8c”, “version”=>”94e28b95-27d3-4554-b99b-11d453f40e7f”, “instance”=>”9b723df2d462441caa352e3337b4e230”, “index”=>0, “reason”=>”CRASHED”, “exit_status”=>0, “exit_description”=>”failed to accept connections within health check timeout”, “crash_timestamp”=>1493917855}
This usually indicates that your server isn't listening on the right port.
I recommend deploying the Liberty Buildpack here and subsequently downloading the source code. This should give you a working Liberty app with the correct manifest to push code to Bluemix.
You list the path to the target artifact as a zip file and the build pack probably does not recognize that artifact type. Try changing it to an executable jar or a war or ear file.
I'm trying to push an app to Bluemix on a Linux OS. However, the command line returns an error involving the manifest file:
Error reading manifest file:
Expected services to be a list of strings.
Here is the code for the manifest file:
applications:
- name: IdeaSocial
memory: 1024M
instances: 1
host: IdeaSocial
domain: mybluemix.net
path: .
services:
-SQL Database-v5
How do I fix this? Is there a form that the file needs to be in for the current version of Bluemix?
Add quotes around SQL Database-v5 to have it treated as a single string even though there is a space in it. Spaces matter in YAML.
...
services:
- "SQL Database-v5"
The documentation has more information and examples.