Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Use custom buildpack to build Stratos UI #1283

Merged
merged 15 commits into from
Oct 11, 2017
Merged

Use custom buildpack to build Stratos UI #1283

merged 15 commits into from
Oct 11, 2017

Conversation

nwmac
Copy link
Contributor

@nwmac nwmac commented Oct 2, 2017

No description provided.

@irfanhabib
Copy link
Contributor

I tested the DB migration, it appears to have failed to attach the Postgres Instance I created on SAP.

I did the following:

  1. Created a Postgres service instance and bound it to the app.
  2. I added the following to my manifest.yaml
services:
- postgresInstance
  1. Re-pushed the app
  2. When it came up, I see the following environment variables:
{
	"VCAP_SERVICES": {
		"postgresql": [
			{
				"credentials": {
					"hostname": "10.11.241.18",
					"ports": {
						"5432/tcp": "53933"
					},
					"port": "53933",
					"username": "Gf5HyIU3Le95Eyly",
					"password": "B7vbRK-qK2az8mUA",
					"dbname": "CXzHsOE38o98Zan4",
					"uri": "postgres://Gf5HyIU3Le95Eyly:B7vbRK-qK2az8mUA@10.11.241.18:53933/CXzHsOE38o98Zan4"
				},
				"syslog_drain_url": null,
				"volume_mounts": [],
				"label": "postgresql",
				"provider": null,
				"plan": "v9.4-dev",
				"name": "postgresInstance",
				"tags": [
					"postgresql",
					"relational"
				]
			}
		]
	}
}
{
	"VCAP_APPLICATION": {
		"cf_api": "https://api.cf.eu10.hana.ondemand.com",
		"limits": {
			"fds": 16384,
			"mem": 256,
			"disk": 256
		},
		"application_name": "console",
		"application_uris": [
			"myconsole.cfapps.eu10.hana.ondemand.com"
		],
		"name": "console",
		"space_name": "dev",
		"space_id": "aa0be4b2-aa0f-41f3-8085-1c937c6e0fda",
		"uris": [
			"myconsole.cfapps.eu10.hana.ondemand.com"
		],
		"users": null,
		"application_id": "de5135c4-76e4-415d-8b1b-9dcd9c283cac",
		"version": "0764e2b7-e93f-4455-bf0d-92ed03dad438",
		"application_version": "0764e2b7-e93f-4455-bf0d-92ed03dad438"
	}
}

However in the logs, it appears that the backend started with SQLlite.

 2017-10-09T09:10:47.43+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Initialization started.                      
   2017-10-09T09:10:47.43+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] HTTP client initialized.                     
   2017-10-09T09:10:47.43+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Loaded configuration from file: ./config.properties 
   2017-10-09T09:10:47.43+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] NewDatabaseConnectionParametersFromConfig    
   2017-10-09T09:10:47.92+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Loaded plugin: {LibraryPath:cf-app-ssh.so PluginPath:cf-app-ssh PluginName:cf-app-ssh} 
   2017-10-09T09:10:47.97+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Using Cloud Foundry API URL: https://api.cf.eu10.hana.ondemand.com 
   2017-10-09T09:10:48.03+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:48 UTC 2017] Cloud Foundry UAA is: https://login.cf.eu10.hana.ondemand.com 
   2017-10-09T09:10:48.05+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:48 UTC 2017] Find                                         
   2017-10-09T09:10:48.05+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:48 UTC 2017] Auto-registering endpoint for Cloud Foundry API 
   2017-10-09T09:10:47.97+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Loaded plugin: {LibraryPath:user-info.so PluginPath:user-info PluginName:user-info} 
   2017-10-09T09:10:47.97+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Detected that Console is deployed as a Cloud Foundry Application 
   2017-10-09T09:10:48.06+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:48 UTC 2017] All done for Cloud Foundry deployment        
   2017-10-09T09:10:47.86+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Proxy database connection pool created.      
   2017-10-09T09:10:47.86+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Created database schema for SQLite database  
   2017-10-09T09:10:47.86+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Database appears to now be available.        
   2017-10-09T09:10:47.86+0100 [APP/PROC/WEB/0] OUT INFO[Mon Oct  9 08:10:47 UTC 2017] Creating SQLite session store                

@irfanhabib
Copy link
Contributor

irfanhabib commented Oct 9, 2017

After following instructions, I'm seeing the following exception:

   2017-10-09T10:06:53.12+0100 [APP/PROC/WEB/0] ERR 2017/10/09 09:06:53 `go run` failed: exec: "go": executable file not found in $PATH

   2017-10-09T10:06:50.41+0100 [APP/PROC/WEB/0] ERR 2017/10/09 09:06:50 `go run` failed: exec: "go": executable file not found in $PATH
   2017-10-09T10:06:50.42+0100 [APP/PROC/WEB/0] OUT Exit status 1
   2017-10-09T10:06:50.46+0100 [CELL/0] OUT Stopping instance 79ba59c4-b77d-44c8-67fd-2645
   2017-10-09T10:06:50.46+0100 [CELL/0] OUT Destroying container
   2017-10-09T10:06:50.48+0100 [API/0] OUT Process has crashed with type: "web"
   2017-10-09T10:06:50.49+0100 [API/0] OUT App instance exited with guid 844c0973-769b-48d8-b8ff-cdee734417f6 payload: {"instance"=>"79ba59c4-b77d-44c8-67fd-2645", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>2, "crash_timestamp"=>1507540010422152099, "version"=>"2147a11b-b951-4c07-a33a-eb3e7a1e9f12"}
   2017-10-09T10:06:50.52+0100 [CELL/0] OUT Creating container
   2017-10-09T10:06:50.74+0100 [CELL/0] OUT Successfully created container
   2017-10-09T10:06:51.14+0100 [CELL/0] OUT Successfully destroyed container
   2017-10-09T10:06:53.03+0100 [CELL/0] OUT Starting health monitoring of container
   2017-10-09T10:06:53.11+0100 [APP/PROC/WEB/0] OUT Starting Stratos UI
   2017-10-09T10:06:53.11+0100 [APP/PROC/WEB/0] OUT Attempting to migrate database
   2017-10-09T10:06:53.11+0100 [APP/PROC/WEB/0] OUT ~/deploy ~
   2017-10-09T10:06:53.11+0100 [APP/PROC/WEB/0] OUT Migrating postgresql instance on 10.11.241.19
   2017-10-09T10:06:53.12+0100 [APP/PROC/WEB/0] OUT goose: migrating db environment 'cf_postgres', current version: 0, target: 20170818162837
   2017-10-09T10:06:53.12+0100 [APP/PROC/WEB/0] ERR 2017/10/09 09:06:53 `go run` failed: exec: "go": executable file not found in $PATH
   2017-10-09T10:06:53.14+0100 [APP/PROC/WEB/0] OUT Exit status 1
   2017-10-09T10:06:53.15+0100 [CELL/0] OUT Stopping instance 4c7ce854-4389-4346-4788-22c8
   2017-10-09T10:06:53.15+0100 [CELL/0] OUT Destroying container
   2017-10-09T10:06:53.17+0100 [API/0] OUT Process has crashed with type: "web"
   2017-10-09T10:06:53.18+0100 [API/0] OUT App instance exited with guid 844c0973-769b-48d8-b8ff-cdee734417f6 payload: {"instance"=>"4c7ce854-4389-4346-4788-22c8", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>3, "crash_timestamp"=>1507540013153650312, "version"=>"2147a11b-b951-4c07-a33a-eb3e7a1e9f12"}
   2017-10-09T10:06:53.88+0100 [CELL/0] OUT Successfully destroyed container

@irfanhabib
Copy link
Contributor

LGTM

I've not tested this against a mysql service

@irfanhabib irfanhabib merged commit 00a25cf into master Oct 11, 2017
@irfanhabib irfanhabib deleted the buildpack branch October 11, 2017 15:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants