So I'm trying to create a proof of consept of getting a Jenkins API from swagger, importing it into mockoon, and then dockerizing it to run as a service in a kubernetes cluster.
I downloaded the JSON from swagger and was able to import into the mockoon desktop application. I then exported it into a file. I downloaded the mockoon cli and then tried to run dockerize but I get the following error:
mockoon-cli dockerize -d jenkins-mockoon-api.json -o `./Dockerfile`
Error: This export file is too old and cannot be run with the CLI
Please re-export the data using a more recent version of the application
I tried re-exporting but no luck. I'm starting to think I'm over complicating it. I just want to be able to deploy a pod with mockoon with that API.
Thanks for the help!
I found the issue. When Exporting you have to specifically do it as a Mockoon environment JSON, not a Swagger or anything else. Not a very good error message though!
Related
This is my first foyer into .Net Core and App Engines, so please forgive me if I sound uninformed.
We have a .Net Core Application that we're trying to get published to a GCP App engine (obviously). when I run dotnet publish -c Release it builds just fine without any errors. When I test the program locally it runs just fine and I'm able to access it. However whenever I try to get it on GCP I get the following error:
Updating service [default] (this may take several minutes)...
.................................................................................................................................................failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
Error:
An assembly specified in the application dependencies manifest (ApplicationName.deps.json) was not found:
package: 'Microsoft.AspNetCore.Mvc.Abstractions', version: '2.0.2'
path: 'lib/netstandard2.0/Microsoft.AspNetCore.Mvc.Abstractions.dll'
This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
aspnetcore-store-2.0.5.xml
Failed to deploy project WebApiDotNetCore to App Engine Flex.
We tried removing it from the dependencies JSON, and that just ended up breaking everything, so it is indeed required. It is installed in the project via nuget, so it should be included with dotnet restore. I've looked around and some sources seem to think that it's the installation of the dotnet core sdk, but I've tried it on three computers and always get the same thing.
Lastly, I should say this happens when I try to deploy through command line as well as directly through Visual Studio with the GCP SDK.
Has anyone experienced this error, or something similar? Any advice or guidance is very much appreciated.
Thanks!
-BT
OP REVISION
As an update I was able to get this resolved aside from the fact that I get a 502 error when I try to load the application. Here are the steps I took for anyone else that is looking what to do:
Pre-reqs: Docker for Windows and Google Cloud SDK installed and running. Running turned out to be a pain with Docker for Windows. Many many restarts and reinstallations.
Open the solution and ensure that the startup project is set correctly.
Right click the startup Project, and select Add > Docker Support.
Select Linux in the popup window and allow the files to be created.
When complete, the Dockerfile should appear in the preview window. Do the following:
For me the first line read: FROM microsoft/aspnetcore:2.0 AS base. Change this to FROM microsoft/aspnetcore-build:2.0 AS base.
Additionally, check to make sure that the last line has the correct .dll name. Docker for Windows will put whatever the project name is rather than the class name, so for me my final .dll names were different than the project name.
Lastly, if your project has any dependencies that are required to run but not to build, then you'll need to manually add them. For me we have a couple of XML files that needed to be put in the app folder, so I had to add COPY *.xml /app/ and put those files in the same folder as the solution file is in.
If there's anything else you need to do to the Dockerfile I highly recommend this page. It's a how-to on all Dockerfile commands written in ENGLISH! (that was my biggest problem with all of this - I have little experience with Linux and even less with Docker and everything was written in Greek for me).
Create an app.yaml file. I just used the standard:
runtime: custom
env: flex
Copy the Dockerfile found in the startup project's folder into the folder with the solution.
Initialize gcloud to the right project, then navigate to the solution folder. The type gcloud app deploy app.yaml, and follow the onscreen guide.
for me it takes about 15 minutes to deploy the GCP, so depending on the complexity of your project it may take longer, though this one is rather complex.
Now I'm trying to figure out my 502 error... I've tried what seems like everything - changing the listening port in the application, exposing the listening port on the dockerfile, trying to get GCP to open that port, and trying half a dozen different ports. It's slow-going since it's such a chore to deploy each time.
Hope this helps anyone that was like me a couple weeks ago and had never even heard of Docker!
Which version of .NET Core is this? Also, have you tried to run in Cloud Shell? Maybe that will provide more clues on what might be wrong.
It looks that you don't have the Microsoft.AspNetCore.Mvc.Abstractions library installed in your system. Using the .NET CLI, type the following command:
dotnet add package Microsoft.AspNetCore.Mvc.Abstractions --version 2.0.2
After that, to ensure the library is included, run the following:
dotnet restore
dotnet build
Try running it locally (it should work), and then use the dotnet publish -c Release command again.
I am using the tutorial Chaincode for Developers and I am getting an error while running "docker-compose-simple.yaml" file.
Does anyone know how to solve this issue?
Have you checked the instructions mentioned in Hyperledger Fabric Samples like
If you are using Docker for Mac, you will need to use a location under /Users, /Volumes, /private, or /tmp. To use a different location, please consult the Docker documentation for file sharing.
I had some problem when I was using different directory.
The error occurs because you are using the latest version of Fabric (I assume that because you are reading the latest fabric.docs).
Clone the 1.0.0-beta version, follow the instructions on 1.0.0-beta fabric docs and you'll be ok.
I tried setting up playground using
https://fabric-composer.github.io/tutorials/getting-started-playground.html
I followed the docker steps everything started OK, was able to access Fabric Composer Playground by clicking on this link: http://localhost:8080
But now what??? I tried to upload a sample model file but it shows error.
How do I try this out. Do I have install Ubuntu on my windows machine to really be able to try out fabric composer?? Pleas help
You can install and run the fabric composer locally on linux only. For that you can use VMWare and install ubuntu on it.
And then follow the installation steps here.
If you don't want to do so, then alternatively you can use the online composer playground and can export(download) your .bna file whenever you want.
Hope this helps you!
Has anybody encountered any issues using forge with AWS for a laravel project?
I've recently followed instructions but I've encountered various errors too many to comment.
After opening a SSH connection to my AWS EC2 instance I've then run the command provided by Taylor on Forge but I get cannot find folder errors etc?
I got a lot of problems with Forge + AWS.
Some of them were:
You should specify correct snapshot for AWS instance - use ubuntu, not Amazon Linux.
You should open SSH for whole world (or get Forge IP address)
Other, a LOT of problems :)
But in the End, I managed to install it.
Following Google instructions to install managed VMs, everything seems to work smoothly until I get to this step:
gcloud preview app setup-managed-vms
The result is the following error:
ERROR: (gcloud.preview.app) Invalid choice: 'setup-managed-vms'.
I've made sure all the other dependent components are up to date.
The environment is:
Windows 7 x64
Google Cloud SDK 0.9.56
boot2docker 1.4.1/1.5 (tried both)
Is there anything obvious I'm missing trying to get these managed VMs working?
Yep - that step is no longer required. The docs should be fixed shortly.
You might wish to look at My java App Engine Managed VMs build doesn't deploy after 4/14/2015 update for additional info.
Our images are now available on the public Google Container registry. For python, you can grab the image at gcr.io/google_appengine/python-compat
It is important to note that you must do the following to use that image:
docker pull gcr.io/google_appengine/python-compat
You can change the FROM line in your Dockerfile. Also, it's important to note that this image does not have the GAE SDK included, but you can add most python libraries yourself.