Cinder API using jclouds - jclouds

I have been reading about the support jclouds added to the Cinder Openstack API, and i was looking at this example usage on Rackspace Cloud.
https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
does anybody know is this is supported for HP Cloud as well? if not, how can i use HP Cloud Block Storage with jclouds?
thanks a lot!

You should be able to use the Cinder API with HP but I tried it out and it wasn't working. Here's what I did.
Iterable<Module> modules = ImmutableSet.<Module> of(new SLF4JLoggingModule());
RestContext<CinderApi, CinderAsyncApi> cinder = ContextBuilder.newBuilder("openstack-cinder")
.endpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/")
.apiVersion("1.1")
.credentials(myHpTenantName + ":" + myHpUsername, myHpPassword)
.modules(modules)
.build(CinderApiMetadata.CONTEXT_TOKEN);
VolumeApi volumeApi = cinder.getApi().getVolumeApiForZone("az-1.region-a.geo-1");
System.out.println(volumeApi.list());
The call to list() returns an empty list but with logging turned on I can see that it's actually a 404 causing the empty list to be returned. The URL that's created to list the volumes is
https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/myHpTenantId/volumes
Which I think should be valid according to the HP service catalog but it's returning a 404.
I'll ping someone I know from HP and see if we can get to the bottom of this.

HP Cloud's support for the OpenStack Block Storage (Cinder) API is coming soon. Please refer to our API documentation for reference to the currently supported Block Storage APIs: https://docs.hpcloud.com/api/block-storage/

Related

Unable to send google container registry in docker image

I'm trying to send my first image to gcr(google container reg.) via local bash, but somehow I couldn't do it even though I added my current user as 'owner' to the project. In the last link that gave me an error, the following was written.
{"errors":[{"code":"UNAUTHORIZED","message":"Unauthorized access."}]}
Also, my ubuntu distribution ip that I use on wsl2 was banned by google on the grounds that I tried too much. This is my 2nd problem that I need to solve.
I encountered my problem in the first item through powershell on my local computer.
What should I do in this case?
The refusal to connect to GCP might be related to the IP ban that you mentioned, was there any specified length to the ban? Usually, an email is sent with more details about the ban. Otherwise, there is specific documentation dealing with authenticating to Container Registry. The documentation lists several authentication methods:
gcloud credential helper
Standalone credential helper
Access token
JSON key file
Which of these methods are you having issues with? The documentation lists the procedure to authenticate properly with each of these methods. Is the correct account configured? It could be a different account or a service account is being used instead.

Does Cloud Run add location-aware request header similar to App engine?

App engine requests have location-aware headers (X-AppEngine-Country, X-AppEngine-Region, X-AppEngine-City) automatically added. Does Cloud Run have something similar?
This is (will be) possible with Google Cloud HTTP(S) Load Balancer via user-defined headers.
However, putting your Cloud Run service behind the load balancer is currently in alpha, so you cannot try this out today. You can wait for a while, or if you’re willing try the alpha out and give feedback, please contact me. #ahmetbtodo
AFAIK, these Google custom header values doesn't exist today. However, in the current headers you can find the IP of the originated requester (here in IPv6)
forwarded: for="2a01:cb14:af0:b500:ccf6:1a91:1713:b48";proto=https
x-forwarded-for: 2a01:cb14:af0:b500:ccf6:1a91:1713:b48*emphasized text*
You can use external services to know the exact location.

Azure Function ServiceBus Trigger Dependency Injection

I have been trying to implement DI for Azure Functions where the functions is triggered by ServiceBus (topics/subscriptions in this case):
[Singleton]
[FunctionName("Alert")]
public static async Task Alert([ServiceBusTrigger(Topic.Alert, Subscription.PowerBi, Connection = "servicebusconnectionstring")] Message message, [Inject]IPowerBiService powerBiService, [Inject]IQueueService queueService)
I have read about Azure Functions and DI on following sites:
https://mcguirev10.com/2018/04/03/service-locator-azure-functions-v2.html
https://blog.wille-zone.de/post/azure-functions-proper-dependency-injection/
https://github.com/introtocomputerscience/azure-function-autofac-dependency-injection
All examples works fins using HTTP trigger, I assume the IIS host is up and running and is containing the services. But using ServiceBus trigger, I can't get it to work. I have implemented the solutions mention above, and a few more but all get same issues. The code works, bu the services are created for message/trigger.
Anyone out there that has manage to do this, or arn't it possible to do?
NOTE (update):
I got some more information that I haven’t got time to verify yet, but I have been using a consumption plan for my Azure Functions. It may be the case that you need an App Service Plan instead (using consumption since that price model is more convenient). If anyone know more about this?
I will look into this later this week.
I just want to confirm that it work’s fine now using an App Service Plan instead of an Consumption Plan. The difference is the "cold start" instead of a "warm" host.
I guess all different once of DI implementations should work fine.
I have been using following : https://github.com/MV10/Azure.FunctionsV2.Service.Locator

Twilio IP Messaging token issue

I'm setting up an iOS app to use the IP Messaging and video calling apis. I'm able to connect, create channels and setup a video call if I manually create hard-coded tokens for the app. However, if I want to use the PHP server (as described here https://www.twilio.com/docs/api/ip-messaging/guides/quickstart-ios) then I always get an error and it can't connect anymore.
I'm attaching a screenshot of what I see when I hit the http://localhost:8080 address which seems to produce a 500 Internal error on this URL: https://cds.twilio.com/v2/Streams
Thanks so much!
After much time spent on this I decided to try the node backend instead - under other server-side languages of the PHP and I have it running in 2 minutes! I used the exact same credentials as the ones that I was using on the PHP config file so either my PHP environment has something strange or the PHP backend needs some fixing. In any case, I'm able to move forward using the node backend, so if you run into the same issue just try node instead of PHP. woohoo!

hub.docker.io reports tags in the web interface but we cannot some of them using the API

We have a private docker registry at hub.docker.io and we discovered that the api does not return all the tags that are visible in the web interface.
API call like https://index.docker.io/v1/repositories/company/reponame/tags returns a list that is not the same as the one we are seeing on https://hub.docker.com/r/company/reponame/tags/
Why do we get this and how can we overcome this?
These tags were added more than 17 hours ago, so I doubt is a caching issue. Also we are using the same credentials to access them.
My impression is that this is product bug so I raised a ticket on https://github.com/docker/hub-feedback/issues/687

Resources