This week in Orchard - 8/9/2018

Gábor Domonkos's avatar
This week in Orchard

In the latest Orchard Podcast we have a demo about the improvements of the Deployment module and have a nice demo about the GraphQL feature of Orchard Core!

On Orchard Core


Last time we mentioned that you can run a recipe on a separate Orchard instance on another server. So, you can link two servers and the client can send a POST request to the remote machine. Then you can upload content to the different machine, like production from the staging.

Now we have a refact about how the deployment steps were executed. The idea is that: when we create a deployment plan and execute it we generate a ZIP file, that could contain recipes, medias and anything else that you want to include in the ZIP file. This is how the content exporting works.

After that we can send this package to any target. These targets are extensible, we could export it to a file for a browser to download it or to an endpoint, therefore we could send that package to another Orchard instance and we can define even more options, like we can send it to an FTP or to a Git repository. So, in this case you can easily create for example backups.

Another instance can read these Git and FTP endpoints to download that and to make the intermediate server to get the deployments, so there are many ways to use that.

Now the logic that imports the file are extracted, any module can do something when the package is imported.


By enabling the GraphQL module of Orchard Core, you have the ability to run GraphQL queries using the new GraphQL explorer from the dashboard under the Configuration menu.

This feature isn't release ready yet, because for instance it cannot lists fields or Markdown yet, so if you want to try out the GraphQL, switch to the jsonapi branch.

In the explorer everything based on metadata schema, that means you can introspect what you can query. Just hit CTRL+SPACE and you have access to everything you can query. The context menu shows all the available content types for you.



Let's see a short demo about the deployment!

For this, we will run two Orchard Core instances on localhost. Let's image a scenario where we send packages from the staging server to the production environment using the deployment module.

For this, you have to create a remote client on the production instance under the Content -> Import/Export -> Remote Clients menu. The remote client is what is able to execute a deployment plan by using a given URL, that could be: http://localhost:2919/Deployment/Import
So, create a remote client with name "Production" and add an API key.

Now you have to define a remote instance in the staging environment under the Remote Instances option. Remote instance is the instance where you want to upload the plan. You have to add the URL here that you can find on the other instance's Remote Clients page. You also have to use the same Client Name and Api Key here that you have defined earlier.

After that you can create a Deployment Plan. Deployment plans have deployment steps where you can define the elements that you would like to export.

For instance, by selecting the Content step you can export all the content items for the specified content types. For the Demo, I have selected to export every blog post. You have the ability to add other steps to your plan as well.

Now if you click on Execute, you will see the available targets, where you can deploy your plan. If you select the Production (which is the name of the previously created remote instance), Orchard will deploy your selection to the Production instance.

But if you choose the File Download target, you can also download a ZIP file, that contains a Recipe.json. And here comes the Package Import option under the Import/Export menu.


Let's see a simple demonstration about the capabilities of the GraphQL explorer!

The following query will list you the blogposts with its created UTC, Title Part, owner, the path value of the Autoroute Part, etc.

The contentItem() is a custom filter which let's you define a content item by it's ID and you will get the content item.

You can also have queries here. For instance, recentBlogPosts is a query that was done in Lucene.

On Orchard Harvest

The latest conference was held in New York, February 2017. In the podcast, the community have a discussion about the next possible Orchard Harvest. There will be propably no Harvest this year, because the community needs to be more advanced with Orchard Core and then they can think about Harvest. Organizing a conference with a released and more powerful Orchard Core could be more interesting for people to take part in the event.

Don't forget to watch the whole recording of this week's Orchard meeting!

No Comments

Add a Comment