on 01-07-2020 9:51 AM
Hello SAP Community
I deployed an HTML 5 component as described in this blog: https://blogs.sap.com/2017/09/20/html5-application-to-the-cloud-foundry-environment-within-sap-cloud...
Then I added a folder with a compiled angular project (e.g. dist folder of a new created angular project.) inside the webapp folder. The new folder contains one html file, an ico file, js files and js.map files.
This project can be build with MTA tools, but when deployed the job fails with the following error log:
10:02:39 (DeployService) Deployment in progress.
10:02:39 (DeployService) Deploying /mtaAngularDev/mta_archives/mtaAngularDev_0.0.3.mtar to endpoint: https://api.cf.eu10.hana.ondemand.com, organization: S#########trial_trial, space: dev.
10:09:44 (DeployService) Target: https://deploy-service.cfapps.eu10.hana.ondemand.com/slprot/S#########trial_trial/dev/slpPreparing to deploy /mtaAngularDev/mta_archives/mtaAngularDev_0.0.3.mtarPrepare deployment filesChecking if there are conflicting processesFound 1 conflicting processesAborting process 3a34e08a-312b-11ea-8267-eeee0a9fb7a5Uploading mtar archiveStarting deploymentDeploying in org "S#########trial_trial" and space "dev"Detected MTA schema version: "3"Detected deployed MTA with ID "mtaAngularDev" and version "0.0.3"Detected new MTA version: "0.0.3"Deployed MTA version: "0.0.3"Service "dest_mtaAngularDev" exists but doesnt have any bound applicationsProcessing service "uaa_mtaAngularDev"...Processing service "mtaAngularDev_html5_repo_runtime"...Processing service "mtaAngularDev_html5_repo_host"...Processing service "dest_mtaAngularDev"...Setting service "uaa_mtaAngularDev" parameters from "xs-security.json"Updating service "uaa_mtaAngularDev"...Updating application "mtaAngularDev_appRouter"...Application "mtaAngularDev_appRouter" attributes are not modified and will not be updatedUploading application "mtaAngularDev_appRouter"...Stopping application "mtaAngularDev_appRouter"...Staging application "mtaAngularDev_appRouter"...Application "mtaAngularDev_appRouter" stagedStarting application "mtaAngularDev_appRouter"...Application "mtaAngularDev_appRouter" started and available at "S#########trial-trial-dev-mtaangulardev-approuter.cfapps.eu10.hana.ondemand.com"Deleting discontinued configuration entries for application "mtaAngularDev_appRouter"...Updating application "mtaAngularDev_ui_deployer"...Application "mtaAngularDev_ui_deployer" attributes are not modified and will not be updatedUploading application "mtaAngularDev_ui_deployer"...Staging application "mtaAngularDev_ui_deployer"...Application "mtaAngularDev_ui_deployer" stagedStarting application "mtaAngularDev_ui_deployer"...Application "mtaAngularDev_ui_deployer" startedError executing application "mtaAngularDev_ui_deployer": Deployment of html5 application content failed [Deployment Id: deploy-83138cd4-312c-11ea-8267-eeee0a9fb7a5]Stopping application "mtaAngularDev_ui_deployer"...A step of the process has failed. Retrying it may solve the issue.To download logs of the process, use the multi-target application plug-in for the Cloud Foundry CLI command "cf dmol -i SOME-LOG-ID" directly in your Cloud Foundry space.For more information see https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/e93b231895b64cbc9221a629535... failed.
Once failed, this cannot be undone. Even removing the folder again, build the MTA and try a deployment will cause the same error to happen.
How can I repair the deployment after it once failed, without creating a complete new project?
Also I would like to know, if there is a better way to deploy such a compiled HTML folder to the HTML 5 Application Repository?
Best regards
Willi
This note resolves the sizing issue:
https://launchpad.support.sap.com/#/notes/0002764058ID: htmlDeployer
_schema-version: '2.1'
parameters:
deploy_mode: html5-repo
config:
sizeLimit: 4
version: 0.0.8
Can anyone tell me how to correctly set the size limit in the mta?
The sizing works with the cf tool with
cf update-service my-app-host -c app-host-config.json
and a app-host-config:
{"sizeLimit": 4}
or directly within the app host creation.
This does not solve the issue with the "unfixable" deployment of the Web IDE. Once broken, you need to recreate the whole project.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again Wilhelm,
the correct way to define the repo size in the mta.yaml file is as follows:
- name: html5_repo_host
parameters:
service-plan: app-host
service: html5-apps-repo
config:
sizeLimit: 6
<br>
as you can see, the sizeLimit config parameter needs to be appended to the definition of the resource.
For the other issue, this seems to be a bug indeed. I would assume that you don't have to delete the entire project, but only the "html5 app repo host plan". In either case, this is still a valid bug. It would be great if you could open a reproducable BCP issue for component BC-CP-CF-HTML5
Thanks!
PS: Besides this bug, does everything work as expected now?
Thank you very much Marius! Totally makes sense to apply this parameter to the app-host.
I do not (yet) know what you mean by BCP, but I would like to create such a reproducible issue/ bug report. Also I can close this question afterwards. 🙂
/@ PS: Yes it works as expected. Unfortunately neither my trial accout html5 quota nor the quota of my org cf account is sufficient to deploy the simple angular app (>10 mb). So me and my team now want to know, if we should host html5 apps with another instance (e.g. a tomcat server) or with the html5 repo ( Where can we find the cost plan for this entitlement?). So the next question would be about the benefits of the html5 repository in the cloud foundry environment. That should maybe be discussed in another question.
Hi Wilhelm,
if I understand you right, you only use the Web IDE to deploy your angular app that you build somewhere else, right?
In this case, I'd recommend to use your local machine to manage the content of the HTML5 App Repo. This CF CLI plugin will help you to do so:
cf html5-push -n <host service ID> .
You can also use the (standard) CF CLI to remove the html5 app repo host service to remove the entire repo:
cf delete-service -f <html5 host service name>
Or the plugin to remove the content
cf html5-delete --content <host service ID>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Marius,
Thank you for your fast response!
Yes my intention is to deploy a compiled app. I tried the html5 plugin before with the simple example on the by you linked page and ended up with the error:
C:\somepath>cf html5-pushPushing HTML5 applications in org somesubbaccount / space somespace as
some@e-mail.com...panic: runtime error: invalid memory address or nil pointer dereference[signal 0xc0000005 code=0x0 addr=0x10 pc=0x746e81]
As this error may be related to the fixed:
https://github.com/SAP/cf-html5-apps-repo-cli-plugin/issues/16
I tried to build the newest version of this tool and failed ☹ (I already created an issue in this git to solve this problem)
However you provided me the missing parameter “-n <html5 host service name>”. Thank you!
I tested the id, but the name is required. (In future this parameter should be moved to the manifest.json, as it will be depreciated). This got me one step farther.
C:\somepath>cf html5-push -n htmlDeployer_html5_repo_hostRedeploying HTML5 applications in org S##########trial_trial / space dev
as some@mail.com...FAILEDCould not upload applications to app-host-id
'some-app-host-id' : maximum file length
exceeded
So now I get the same issue as in the Web IDE.
FYI: Switching to the Web IDE helped with the concept of MTA deployment, as this seems to be more practiced by the community until now. I expect that this approach should work with the Web IDE. Furthermore the Web IDE deployment cannot be simply undone by another build with “normal sized” files. So this Web IDE problem persists.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.