I know that we can deploy our applications through pivotal cloud foundry.We can push build packs that provide framework and run time support for your applications.I want to create a Jenkins job to list all the build packs available on my cloud foundry.How this can be achieved.Thanxx
You can use the CLI to list the buildpacks: cf buildpacks or you can just query the cloud controller directly (api.system domain) by GETing /v2/buildpacks, however you need to be an authenticated user to make this request.
Even more you can launch curl directly from cf client command:
# cf curl /v2/buildpacks
{
"total_results": 9,
"total_pages": 1,
"prev_url": null,
"next_url": null,
"resources": [
{
"metadata": {
"guid": "b7890a54-f7c5-4973-a3da-e1a48ba6811d",
"url": "/v2/buildpacks/b7890a54-f7c5-4973-a3da-e1a48ba6811d",
"created_at": "2017-05-24T12:53:27Z",
"updated_at": "2017-05-24T12:53:27Z"
},
"entity": {
"name": "binary_buildpack",
"position": 1,
"enabled": true,
"locked": false,
"filename": "binary_buildpack-cached-v1.0.11.zip"
}
},
...
"metadata": {
"guid": "95e3f977-09d1-4b96-96bc-e34125e3b3a2",
"url": "/v2/buildpacks/95e3f977-09d1-4b96-96bc-e34125e3b3a2",
"created_at": "2017-05-24T12:54:03Z",
"updated_at": "2017-05-24T12:54:04Z"
},
"entity": {
"name": "staticfile_buildpack",
"position": 8,
"enabled": true,
"locked": false,
"filename": "staticfile_buildpack-cached-v1.4.5.zip"
}
}
]
}
Doc https://apidocs.cloudfoundry.org/258/
Related
I'm not seeing my posixAccounts information from the following link:
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/get
{
"kind": "admin#directory#user",
"id": "8675309",
"etag": "\"UUID\"",
"primaryEmail": "email#example.com",
"name": {
"givenName": "Email",
"familyName": "Account",
"fullName": "Email Account"
},
"isAdmin": true,
"isDelegatedAdmin": false,
"lastLoginTime": "2021-08-04T21:11:17.000Z",
"creationTime": "2021-06-16T14:32:35.000Z",
"agreedToTerms": true,
"suspended": false,
"archived": false,
"changePasswordAtNextLogin": false,
"ipWhitelisted": false,
"emails": [
{
"address": "email#example.com",
"primary": true
},
{
"address": "email#example.com.test-google-a.com"
}
],
"phones": [
{
"value": "123-456-7890",
"type": "work"
}
],
"nonEditableAliases": [
"email#example.com.test-google-a.com"
],
"customerId": "id12345",
"orgUnitPath": "/path/to/org",
"isMailboxSetup": true,
"isEnrolledIn2Sv": false,
"isEnforcedIn2Sv": false,
"includeInGlobalAddressList": true
}
As you can see from the above output, there's no posixAccount information. I can open the ldap information in Apache Directory studio, so I know it's there, but I can't see it from the above output. Since I can see it though, I tried to update this using the update function in the API.
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/update
I used this for the payload as I'm just testing updating the gid information. I used the documentation below to get the entry details needed. At least as far as I could tell.
{
"posixAccounts": [
{
"gid": "12345",
}
]
}
https://developers.google.com/admin-sdk/directory/reference/rest/v1/users
I'm getting a 200 response, but nothing is actually changing for the user when doing a PUT to update.
I tried a similar update method from another user on here, but no avail: Google Admin SDK - Create posix attributes on existing user
I was able to get this resolved by supplying additional details in my PUT request:
{
"posixAccounts": [
{
"username": "email(excluding #domain.com)",
"uid": "1234",
"gid": "12345",
"operatingSystemType": "unspecified",
"shell": "/bin/bash",
"gecos": "Firstname Lastname"
"systemId": ""
}
]
}
The above wouldn't reflect in LDAP until I put "systemId" in there. So that part is required.
I have updated my android app with the new version which is an expo app but when users open the app (after updating it) it opens with the old version.
Unless users delete the existing app from phone and reinstall from google play store, it does not get update.
You can see my app.json file in the below, please help.
{
"expo": {
"name": "ABC",
"description": "ABC Description",
"slug": "abc-abc-abc",
"version": "2.0.2",
"privacy": "unlisted",
"sdkVersion": "39.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain"
},
"updates": {
"enabled": false
},
"assetBundlePatterns": ["**/*"],
"ios": {
"bundleIdentifier": "com-abc-abc",
"buildNumber": "2.0.2",
"supportsTablet": true
},
"android": {
"package": "com.abc",
"versionCode": 45,
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#ffffff"
},
"permissions": ["WRITE_CALENDAR", "READ_CALENDAR"]
}
}
}
Changing
"privacy": "unlisted" to "privacy": "public"
fixed the problem
The dataproc page describing druid support has no section on how to load data into the cluster. I've been trying to do this using GC Storage, but don't know how to set up a spec for it that works. I'd expect the "firehose" section to have some google specific references to a bucket, but there are no examples how to do this.
What is the method to load data into Druid, running on GCP dataproc straight out of the box?
I haven't used Dataproc version of Druid, but have a small cluster running in Google Compute VM. The way I ingest data to it from GCS is by using Google Cloud Storage Druid extension - https://druid.apache.org/docs/latest/development/extensions-core/google.html
To enable extension you need to add it to a list of extension in your Druid common.properties file:
druid.extensions.loadList=["druid-google-extensions", "postgresql-metadata-storage"]
To ingest data from GCS I send HTTP POST request to http://druid-overlord-host:8081/druid/indexer/v1/task
The POST request body contains JSON file with ingestion spec(see ["ioConfig"]["firehose"] section):
{
"type": "index_parallel",
"spec": {
"dataSchema": {
"dataSource": "daily_xport_test",
"granularitySpec": {
"type": "uniform",
"segmentGranularity": "MONTH",
"queryGranularity": "NONE",
"rollup": false
},
"parser": {
"type": "string",
"parseSpec": {
"format": "json",
"timestampSpec": {
"column": "dateday",
"format": "auto"
},
"dimensionsSpec": {
"dimensions": [{
"type": "string",
"name": "id",
"createBitmapIndex": true
},
{
"type": "long",
"name": "clicks_count_total"
},
{
"type": "long",
"name": "ctr"
},
"deleted",
"device_type",
"target_url"
]
}
}
}
},
"ioConfig": {
"type": "index_parallel",
"firehose": {
"type": "static-google-blobstore",
"blobs": [{
"bucket": "data-test",
"path": "/sample_data/daily_export_18092019/000000000000.json.gz"
}],
"filter": "*.json.gz$"
},
"appendToExisting": false
},
"tuningConfig": {
"type": "index_parallel",
"maxNumSubTasks": 1,
"maxRowsInMemory": 1000000,
"pushTimeout": 0,
"maxRetry": 3,
"taskStatusCheckPeriodMs": 1000,
"chatHandlerTimeout": "PT10S",
"chatHandlerNumRetries": 5
}
}
}
Example cURL command to start ingestion task in Druid(spec.json contains JSON from the previous section):
curl -X 'POST' -H 'Content-Type:application/json' -d #spec.json http://druid-overlord-host:8081/druid/indexer/v1/task
I'm deploying an Angular - Django app on a Digital Ocean droplet. It's composed of 3 Docker containers:
cards_front: the Angular front-end
cards_api: the django rest framework back-end
cards_db: the postgres database
They're all on the same network:
[
{
"Name": "ivan_cards_api_network",
"Id": "ddbd3524e02a7c918f6e09851731e015fdb7e8647358c5ed0c4cd949cf651fd9",
"Created": "2018-10-09T23:44:33.293036243Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.22.0.0/16",
"Gateway": "172.22.0.1"
}
]
},
"Internal": false,
"Attachable": true,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"0d3144b27eaf6d7320357b6d703566e489f672b09b61dba0caf311c6e1c4711c": {
"Name": "cards_front",
"EndpointID": "47b1f8f42c4d18afeafeb9da502fd0197e726f29bd6d3d3c2960b44737bd579a",
"MacAddress": "02:42:ac:16:00:04",
"IPv4Address": "172.22.0.4/16",
"IPv6Address": ""
},
"3e9233f4bfc023632aaf13a146d1a50f75b4944503d9f226cf81140e92ccb532": {
"Name": "cards_api",
"EndpointID": "34d4780dc6f907a8cb9621223d6effe0a0aac1662d5272ae4a5104ba7f3808c4",
"MacAddress": "02:42:ac:16:00:03",
"IPv4Address": "172.22.0.3/16",
"IPv6Address": ""
},
"e5e208a20523c2d41433b850dc64db175de8ee7d0d156e2917c12fd8ebdf97ab": {
"Name": "cards_db",
"EndpointID": "8a8f44bbcdf2f95e716e2763e33bed31e1d2bdbfae7f6d78c8dee33de426a7ef",
"MacAddress": "02:42:ac:16:00:02",
"IPv4Address": "172.22.0.2/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {
"com.docker.compose.network": "cards_api_network",
"com.docker.compose.project": "ivan",
"com.docker.compose.version": "1.22.0"
}
}
ALLOWED_HOSTS on django settings is set to ['*']
When I test the Angular front-end on the browser I get on Chrome's developer tools:
GET http://localhost:8000/themes net::ERR_CONNECTION_RESET
So, the Angular container is failing to communicate with the django container.
But if I do a curl localhost:8000/themes from inside the DO droplet I get a response.
I know there's something missing on the network configuration, but I can't figure out what it is.
Thank you
EDIT:
If I do a curl from inside the Angular container to the django container I get a response (the empty array):
root#90cea47dd13d:/# curl 172.22.0.3:8000/themes
[]
i am trying to use the redmine API to create new issue via code,
just to test it i am trying to send the data to the API using postman.
i have used amazon to host it.
I try send json via post method. (using postman -plugin for chrome)
url:- http://{user_name}:{password}#xxxredmine_urlxxx/issues.json
type:- POST
Body:-
{
"issue": {
"project_id": 1,
"subject": "New ticket via API",
"description": "API test 27\/6",
"status_id": 1,
"priority_id": 3,
"assigned_to_id": 5
}
}
it creates a ticket successfully but never sets an assignee
{
"issue": {
"id": 61,
"project": {
"id": 1,
"name": "EasySoft"
},
"tracker": {
"id": 1,
"name": "Bug"
},
"status": {
"id": 1,
"name": "New"
},
"priority": {
"id": 3,
"name": "High"
},
"author": {
"id": 1,
"name": "UserName LastName Admin"
},
"subject": "New ticket via API",
"description": "API test 27/6",
"start_date": "2016-06-27",
"done_ratio": 0,
"custom_fields": [
{
"id": 2,
"name": "Customer name",
"value": ""
}
],
"created_on": "2016-06-27T09:37:58Z",
"updated_on": "2016-06-27T09:37:58Z"
}
}
i have tried changing assigned_to_id to
"assigned_to":{"id":5}
Thank you in advance.
This is an old question but potentially still useful to answer... are you certain that the user you are attempting to set as the assignee is in an assignable role on that specific project? Unfortunately, the Redmine REST API will respond with a 200 OK even if you give it a non-assignable user, so there's no indication that it was unable to successfully set the user as the assignee.