diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml index c9d39fad30..a410be9a31 100644 --- a/.github/workflows/auto-pr.yml +++ b/.github/workflows/auto-pr.yml @@ -1,8 +1,8 @@ -name: Merge branch dev with rel-7.2 +name: Merge branch dev with rel-7.3 on: push: branches: - - rel-7.2 + - rel-7.3 permissions: contents: read @@ -18,13 +18,13 @@ jobs: ref: dev - name: Reset promotion branch run: | - git fetch origin rel-7.2:rel-7.2 - git reset --hard rel-7.2 + git fetch origin rel-7.3:rel-7.3 + git reset --hard rel-7.3 - name: Create Pull Request uses: peter-evans/create-pull-request@v3 with: - branch: auto-merge/rel-7-2/${{github.run_number}} - title: Merge branch dev with rel-7.2 - body: This PR generated automatically to merge dev with rel-7.2. Please review the changed files before merging to prevent any errors that may occur. + branch: auto-merge/rel-7-3/${{github.run_number}} + title: Merge branch dev with rel-7.3 + body: This PR generated automatically to merge dev with rel-7.3. Please review the changed files before merging to prevent any errors that may occur. reviewers: ${{github.actor}} - token: ${{ github.token }} + token: ${{ github.token }} \ No newline at end of file diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json index acfe23fd00..34092c44ee 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json @@ -461,6 +461,9 @@ "UnitPrice": "Unit Price", "OverallDiscountAmount": "Overall Discount Amount", "DiscountAmount": "Discount Amount", - "FullChangeHistory": "Full Change History" + "FullChangeHistory": "Full Change History", + "Permission:RefreshReleaseLogs": "Refresh Release Logs", + "ReleaseLogs": "Release Logs", + "AuthorUserName": "Author User Name" } } diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json index bddb51b98b..cac642e20b 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json @@ -208,7 +208,7 @@ "WhenShouldIRenewMyLicense": "When should I renew my license?", "WhenShouldIRenewMyLicenseExplanation": "If you renew your license within {3} days after your license expires, the following discounts will be applied: Team License {0}; Business License {1}; Enterprise License {2}. However, if you renew your license after {3} days since the expiry date of your license, the renewal price will be the same as the license purchase price and there will be no discount on your renewal.", "TrialPlan": "Do you have a trial plan?", - "TrialPlanExplanation": "No, there is no trial version for ABP Commercial. You can check the community edition to understand the code quality and approaches. We also offer a 30-day money-back guarantee for the Team license, no questions asked! You can request a refund within the first 30 days. We provide a 60% refund within 30 days for Business and Enterprise licenses. This is because the Business and Enterprise licenses contain the full source-code of all the modules and themes.", + "TrialPlanExplanation": "Yes, to start your free trial contact marketing@abp.io. We also offer a 30-day money-back guarantee for the Team license, no questions asked! You can request a full refund within the first 30 days of the license purchase. We provide a 60% refund within 30 days for Business and Enterprise licenses. This is because the Business and Enterprise licenses contain the full source-code of all the modules and themes.", "DoYouAcceptBankWireTransfer": "Do you accept bank wire transfers?", "DoYouAcceptBankWireTransferExplanation": "Yes, we accept bank wire transfers.
After sending the license fee via bank transfer, send your receipt and requested license type to accounting@volosoft.com.
Our international bank account information:", "HowToUpgrade": "How to upgrade existing applications when a new version is available?", @@ -231,7 +231,7 @@ "ComputerLimitation": "How many computers can a developer login when developing ABP?", "ComputerLimitationExplanation": "We specifically permit {0} computers per individual/licensed developer. Whenever there is a need for a developer to develop ABP Commercial products on a third machine, an e-mail should be sent to license@abp.io explaining the situation and we will then make the appropriate allocation in our system.", "RefundPolicy": "Do you have a refund policy?", - "RefundPolicyExplanation": "You can request a refund within 30 days of your license purchase. The Business and Enterprise license types have source-code download option, therefore refunds are not available for the Business and Enterprise (along with any licenses that include a right to receive source-code). In addition, no refunds are made for renewals and second license purchases.", + "RefundPolicyExplanation": "You can request a refund within 30 days of your license purchase. The Business and Enterprise license types have source-code download option, therefore we provide a 60% refund within 30 days for Business and Enterprise licenses. In addition, no refunds are made for renewals and second license purchases.", "HowCanIRefundVat": "How can I refund VAT?", "HowCanIRefundVatExplanation1": "If you made the payment using 2Checkout, you can refund VAT via your 2Checkout account:", "HowCanIRefundVatExplanation2": "Log in to your 2Checkout account", @@ -842,6 +842,58 @@ "BlazoriseSupportExplanation3": "Log into the Blazorise support website at blazorise.com/support/login.", "BlazoriseSupportExplanation4": "If you have an active ABP Commercial license, you will also have a Blazorise PRO license. You can get your Blazorise license key at blazorise.com/support/user/manage/license.", "BlazoriseSupportExplanation5": "You can post your questions on the support website and generate a product token for your application.", - "AbpLiveTrainingPackages": "ABP Live Training Packages" + "AbpLiveTrainingPackages": "ABP Live Training Packages", + "Releases": "Releases", + "ReleasesDescription": "ABP Commercial releases and their changelogs.", + "ReleaseDate": "Release Date", + "Labels": "Labels", + "PreRelease": "Pre-release", + "AllTypes": "All Types", + "Enhancement": "Enhancement", + "Bug": "Bug", + "Feature": "Feature", + "AllUIs": "All UI's", + "MVC": "MVC", + "HowItWorks_Page_Title": "How it works?", + "HowItWorks_Page_Description": "ABP Framework extends the .NET platform. So, anything you can do with a plain .NET solution is already possible with the ABP Framework. That makes it easy to get started with a low learning curve.", + "HowItWorks": "How it works?", + "HowItWorks_Description1": "ABP Framework extends the .NET platform. So, anything you can do with a plain .NET solution is already possible with the ABP Framework. That makes it easy to get started with a low learning curve.", + "HowItWorks_Description2": "Once you start learning and using the ABP Framework features, developing your software will be much more enjoyable than ever.", + "HowItWorks_Description3": "This page basically explains how you use the ABP.IO Platform as a .NET developer.", + "CreateANewSolution": "Create a New .NET Solution", + "CreateANewSolution_Description1": "Everything starts by creating a new ABP integrated .NET solution.", + "StartWithStartupTemplates": "Start one of the pre-built startup solution templates", + "SimpleMonolithApplicationTemplate": "Simple monolith application template", + "LayeredApplicationTemplate": "Layered application template", + "MicroserviceSolutionTemplate": "Microservice solution template", + "CreateEmptySolutionAndUseAbp": "Or create a new empty .NET solution and install ABP NuGet & NPM packages yourself.", + "CreatingSolutionWithMultipleOptions": "There are multiple User Interface and Database options while creating a new solution.", + "DatabaseOptions": "Database Options", + "UIOptions": "UI Options", + "DotnetSolutionWithoutDependency": "Now, you have a regular .NET solution in your local computer that has no dependency to a cloud platform or external service.", + "CheckTheDocumentForDetails": "You can check the {1} document for details.", + "UIAndDatabaseIndependent": "ABP can work with any UI and any database provider supported by .NET. \n However, these UI and database providers are pre-integrated and well documented.", + "InstallAbpModules": "Install ABP Modules", + "DevelopYourSolution": "Develop Your Solution", + "DeployAnywhere": "Deploy Anywhere", + "InstallAbpModule_Description1": "ABP is a modular application development framework. Startup solution templates already come with the essential modules installed. \n But there are more application modules you may want to use in your solution.", + "InstallAbpModule_Description2": "Every module consists of a few NuGet and NPM packages and has an installation document. ABP Suite does most of the work automatically, then you manually configure or fine tune the module based on its documentation.", + "DevelopYourSolution_Description1": "ABP’s infrastructure makes you focus on your own business code by automating the repetitive work and providing pre-built infrastructure and application features.", + "DevelopYourSolution_Description2": "In the following code block, you can see how the ABP Framework seamlessly integrates into your code and automates the repetitive tasks for you.", + "DevelopYourSolution_Description3": "Even in this short code block, ABP does a lot of things for you.", + "DevelopYourSolution_Description4": "It provides base classes to apply conventions, like \n dependency injection. Generic \n repository services provide a convenient \n way to interact with the database. Declarative \n authorization works with a fine-tuned permission system.", + "DevelopYourSolution_Description5": "ABP completely automates \n unit of work (for database connection and transaction management), \n exception handling, \n validation\n and audit logging. It provides many more building blocks to simplify your daily development tasks and focus on your own code while creating production ready \n applications.", + "DevelopYourSolution_Description6": "You can imagine how much that code block can be long and complicated if you would do it all manually.", + "SuiteCrudGenerationInFewSeconds": "In addition to hand coding your solution, you can create fully working advanced CRUD pages in a few minutes using the ABP Suite tooling. It generates the code into your solution, so you can fine tune it based on your custom requirements.", + "DeployAnywhere_Description1": "At the end of the day, you have a pure .NET solution. You can deploy your solution to your own server, to a cloud platform, kubernetes or anywhere you want. You can deploy to as many servers as you want. ABP is a deployment environment agnostic tool.", + "ExpertiseAbpFramework": "Expertise the ABP Framework", + "ExpertiseAbpFramework_Description1": "Want to go beyond basics and get expertise with the ABP.IO Platform?", + "FreeDownload": "Free Download", + "Read": "Read", + "HavingTrouble": "Having Trouble?", + "HavingTrouble_Description1": "Do you have problems with developing your solution? We are here! Use the ABP Support platform \n or send an email to get help directly from the Core ABP Framework team members.", + "WeAreHereToHelp_Description1": "You can browse our help topics or search in the frequently asked questions, \n or you can ask us a question by using the contact form.", + "AllModules": "All Modules", + "AllModules_Description1": "Account, Audit Logging, CMS Kit, Forms, GDPR, Identity, Identity Server UI, Language Management, LeptonX Theme and more..." } } diff --git a/common.props b/common.props index e034286ee6..aaeef01eee 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 7.3.0 + 7.4.0 $(NoWarn);CS1591;CS0436 https://abp.io/assets/abp_nupkg.png https://abp.io/ diff --git a/delete-bin-obj.ps1 b/delete-bin-obj.ps1 index e26ba4fdce..6a6741b767 100644 --- a/delete-bin-obj.ps1 +++ b/delete-bin-obj.ps1 @@ -1,7 +1,5 @@ Clear-Host - Write-Host "Deleting all BIN and OBJ folders..." -ForegroundColor Cyan - Get-ChildItem -Path . -Include bin,obj -Recurse -Directory | ForEach-Object { if ($_.FullName -notmatch "\\node_modules\\") { Write-Host "Deleting:" $_.FullName -ForegroundColor Yellow diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/01-microservice-solution.png b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/01-microservice-solution.png new file mode 100644 index 0000000000..4fb7429ec7 Binary files /dev/null and b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/01-microservice-solution.png differ diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/02-run-single-service.png b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/02-run-single-service.png new file mode 100644 index 0000000000..9380eb830f Binary files /dev/null and b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/02-run-single-service.png differ diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/03-tye-yaml-file.png b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/03-tye-yaml-file.png new file mode 100644 index 0000000000..5b38d6fccf Binary files /dev/null and b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/03-tye-yaml-file.png differ diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/04-tye-dashboard.png b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/04-tye-dashboard.png new file mode 100644 index 0000000000..1444b2a0c6 Binary files /dev/null and b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/04-tye-dashboard.png differ diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/05-example-microservice-solution.png b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/05-example-microservice-solution.png new file mode 100644 index 0000000000..663b55a8dc Binary files /dev/null and b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/05-example-microservice-solution.png differ diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/06-abp-studio-kubernetes-tunnel-how-it-works.png b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/06-abp-studio-kubernetes-tunnel-how-it-works.png new file mode 100644 index 0000000000..de4c124343 Binary files /dev/null and b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/06-abp-studio-kubernetes-tunnel-how-it-works.png differ diff --git a/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/POST.md b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/POST.md new file mode 100644 index 0000000000..58849266eb --- /dev/null +++ b/docs/en/Community-Articles/2023-06-05-Kubernetes-Integration-Abp-Studio/POST.md @@ -0,0 +1,226 @@ +# Kubernetes Integrated Microservice Development with .NET and ABP Studio + +## Abstract + +**Microservice architecture** is a quite common approach to build **highly scalable** solutions with a large development team. While there are standard tools, like **Kubernetes**, to deploy, run and scale your microservices, the **development side** is not as mature as that. It is not easy to develop, run and test a single microservice that **depends on** other microservices and services. **Running** a copy of the entire system in the developer's machine is impractical. + +In this article, I will introduce an **efficient** way of creating a **development environment** that is well **integrated to Kubernetes**. In this way, you can just run the microservice you are building and let Kubernetes run all your dependencies in your local machine or a remote server. + +I will demonstrate the solution by introducing and using a brand new tool for ABP Developers: **ABP Studio**! + +>**This article is based on my *[Kubernetes Integrated Microservice Development with ABP Studio](https://www.youtube.com/watch?v=XiPRcIHJ3NE)* talk performed in [ABP Dotnet Conf'23](https://abp.io/conference). You can watch that talk if you would like watching rather than reading.** + +## Topics + +Let’s start by introducing the main topics I will cover in this article: + +* I will begin by defining the **problem**: Why it is hard to prepare a development environment for a microservice development. +* I will mention and demonstrate how **Microsoft’s Tye project** tries to solve the problem and why it falls short. +* Then I will introduce the **ABP Studio**, a brand new product for .NET developers, which has an efficient solution for **running multi-application solutions** locally. +* Finally, I will offer an efficient way of developing such complex solutions locally by **integrating Kubernetes into our development environment**, and demonstrate how ABP Studio automates it for us. + +## Difficulties of a Microservice Development Environment + +It is important to understand what is the essential problem when we try to set up a development environment for a microservice solution. To understand the main difficulty, let’s see what a microservice solution looks like: + +![example-microservice-solution](01-microservice-solution.png) + +A typical microservice solution consists of many components communicating to each other. In this example; + +* We have **two applications** for users. One for back-office admin users and one for the end-users of the system, a public website. +* These applications use dedicated **API Gateways** since we are using the Backend For Frontend pattern here. +* There is a separate **authentication service** application to login and manage user accounts. +* Behind the API gateways, we typically have many API applications, called **microservices**. Here, I show only three microservices, but there will be tens of microservices even in a medium-size system. Each of these microservices may have their own databases. +* The microservices typically **interact** with each other using REST API calls or asynchronous messaging through an event bus service, like RabbitMQ here. + +There will be much more **supporting services**, like Redis, Elasticsearch and so on. As you see, we have a lot of independent services and applications interacting with each other in a typical microservice solution. + +### How to run a single service locally? + +Generally, your responsibility is developing **one or a few of these microservices** or applications, not all of them. For example, you may be responsible for developing or testing the Product microservice: + +![run-single-service-in-a-microservice-solution](02-run-single-service.png) + +All you want to do is to write your code, then run and test your service if it is correctly working. However, to be able to **develop**, **run**, **test** or **debug** the product microservice, all of the service and infrastructure dependencies need to be running and communicating to each other. + +Okay, maybe not all, but most of them are needed. Otherwise, you can not open the application UI, login to the system, add products to basket and place an order to see if it is working properly, or you can not **live debug** your service code in case of trouble. + +So, how to make the whole system up and running easily to be able to **focus on developing**, testing and debugging the Product microservice? + +## The Project Tye + +You are not the only one getting trouble to develop, run, test and debug a microservice solution. Microsoft also thought of it and introduced a tool called the [Project Tye](https://github.com/dotnet/tye). With its own words in their GitHub repository: + +> Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. + +Tye can **simplify microservices development** by making it easy to run many services with one command, use dependencies in containers, discover addresses of other services using simple conventions. It can also deploy .NET applications to Kubernetes by automatically creating containers for .NET applications and generating Kubernetes manifests with minimal knowledge or configuration. + +The deployment part is not mature and they have to do a lot of work. However, the solution runner part works very well. + +Tye project consists of three major components: + +* A **YAML file** to configure your services +* A **CLI tool** to run and deploy the solution +* And a **dashboard** to visualize the running services. + +### The tye.yaml file + +Tye uses a YAML file to configure your solution. It typically contains many service definitions. There are three type of services can be defined in this YAML file: + +* You can add a **.NET Project**, so Tye runs it locally with **dotnet run** +* You can add a **container definition**, and Tye runs it using **Docker** +* And an arbitrary **executable application** that can be run using a terminal command + +Here, an example content of a `tye.yaml` file: + +![tye-yaml-file](03-tye-yaml-file.png) + +### The Tye CLI + +Once you define your YAML file, Tye can run all the services with a single terminal command: **tye run**. It builds all .NET applications before running them. If you specify the **watch parameter**, it watches the changes in your .NET projects, re-builds and runs them when a change happens. There are also [other commands](https://github.com/dotnet/tye/blob/main/docs/reference/commandline/README.md) to build and deploy your solution. + +### The Tye Dashboard + +The final major component is the Tye Dashboard. With this dashboard, you can see the **list of the services** with their statuses. You can also view their **logs** and open their **UI** with a single click. + +A screenshot from the Tye Dashboard: + +![project-tye-dashboard](04-tye-dashboard.png) + +### The Example Microservice Solution + +I’ve prepared a microservice solution for demos in this article and I will use the same solution in all demos. Here, an overall diagram of the example solution: + +![example-microservice-solution](05-example-microservice-solution.png) + +We have two web applications, two API Gateways, 5 microservices. 3 of them are shown here: Product, Ordering and Identity microservices. Every microservice has its independent SQL Server database. They communicate through REST API calls and distributed events via RabbitMQ. + +### The Project Tye Demo + +You can watch my 6-minutes demo to see the Project Tye in action: + + + +[Click here to watch the demo on YouTube](https://www.youtube.com/watch?v=S0-z29lMokA) + +### Tye: Shortcomings + +The demo shows how the Tye project is useful. However, there are many missing points and problems with the current project state. Let’s talk about them; + +* The first problem is that it **starts very slow**, because every time you run it, it builds all the services. It takes more than 1 minute for a solution with only ten services. +* It currently can run everything in your **local computer**. Even if you want to develop a single service, running tens of services locally consumes your system resources. You need a lot of RAM and CPU if you want to work a large solution locally. +* The **UI part** is currently very simple. For example, if you want to debug one of your services by running it in Visual Studio, you need to stop all the services, change the YAML file to exclude that service from Tye, then run all the services again. Only after that you can run your service in Visual Studio to debug it as integrated to other services. Obviously this process is not easy and comfortable. +* We can only see the application logs in the UI. **More insights** about the internals of services would be very helpful. +* Tye currently has some **partial documents** in its GitHub repository. However, the documentation is far away from being complete. +* Finally, and most importantly, there is **no active development** on the Tye project on GitHub. It was already an experimental project with its early state, as declared in its GitHub repository. + +So, basically, it seems Microsoft has no further interest in this project and you can expect it will be retired in the near future. + +## ABP Studio + +Okay, now we came to the ABP Studio part. At [Volosoft](https://www.volosoft.com/), we were silently working on the ABP Studio project for more than one year. + +ABP Studio is a **cross-platform desktop application** for ABP developers. It is **well integrated** to the ABP Framework and aims to provide a comfortable development environment for you by **automating things**, **providing insights** about your solution, making **develop**, **run** and **deploy** your solutions much easier. + +We are planning to release a **beta version** in **Q3 of 2023**. You can expect the following features shipping with the initial release: + +* You can **create new ABP solutions** and modules easily with a lot of options. +* You can easily **install or uninstall modules** to your solution. +* You can **explore** the fundamental **structures** of your solution or used modules, like entities, repositories, application services, UI pages, HTTP APIs, database tables and much more. +* You can build **multi-module monolith applications** or distributed microservice solutions by easily adding modules and services into your solution. +* You can easily **run multiple applications** and services with a single click, just like I demonstrated with the Project Tye. However, it has much more features. +* You can run your service by **integrating** it into a **Kubernetes** cluster, so you don’t need to run all your dependencies and all other services in your local development environment. This is the essential topic of this talk and I will later demonstrate how it works. + +## ABP Studio Solution Runner + +I've prepared a demo of the ABP Studio Solution Runner, but first I want to mention the main features of the solution runner: + +* First of all, it can run one, **multiple** or **all services** with a single click. In this way, it is very easy to stop a service, run it in Visual Studio to **test** or **debug**. +* All the services are **connected to ABP Studio** and send their internal data to **visualize** on the ABP Studio UI. +* In the **overall view**, you can see a list of services, view **real-time** HTTP Request and exception counts for each service. +* You can see all details of all **HTTP requests** coming to any service. +* You can see **exception details** as real-time in any service, easily filter and search. +* Just like Tye, you can see the **application logs**. But as more, you can filter logs by log level or search in the log texts. +* Last but not least, ABP Studio has an **integrated Chrome browser** inside it. You can browse the UI of your application without leaving the solution runner. + +### ABP Studio Solution Runner Demo + +You can watch my 9-minutes demo to see ABP Studio Solution Runner in action: + + + +[Click here to watch the demo on YouTube](https://www.youtube.com/watch?v=sSCxyccoHqE) + +## ABP Studio Kubernetes Tunnel + +Finally, we came to the essential topic I want to talk about. Until that point, we had a good understanding of the problem and possible solutions. In this part, we will make a final touch to the solution to have **a great development environment for a microservice solution**. + +ABP Studio Kubernetes Tunnel System allows you to **connect your local development environment to a local or remote Kubernetes cluster**, where that cluster already runs your microservice solution. In this way, you can access any service in Kubernetes with their service name as DNS, just like they are running in your local computer. This is established with a secure VPN connection. + +Secondly, you can **intercept any service** in that cluster, so all the **traffic to the intercepted service is automatically redirected to your service** that is running in your local machine. When your service needs to use any service in Kubernetes, the traffic is redirected back to the cluster, just like your local service is running inside the Kubernetes. In this way, you don’t need to care about how all other services are configured and running. You just focus on the service you are responsible for developing, testing or debugging. You can use your favorite IDE since you are running your service in your local machine as you always do. + +The solution runner is a great way of running multiple services locally. However, if your solution consists of hundreds of services, running all them in your local machine will consume your system resources and slow down your development speed. The best news is that: You can use the **Kubernetes Tunnelling combined with all the solution runner features** to have a perfect local microservice development environment. + +### How ABP Studio Kubernetes Tunnel works + +I am sure that you want to see it in action, but before that, let me explain how the solution works. + +![abp-studio-kubernetes-tunnel-how-it-works](06-abp-studio-kubernetes-tunnel-how-it-works.png) + +* **Kubernetes cluster** is shown on the right side and your **local development machine** is shown on the left side. +* As you know, when a **user requests a web page** from your web application, the request is accepted by an **Ingress Controller** inside your Kubernetes cluster. +* The Ingress controller forwards the request to your **web application**, which then uses an **API gateway** to consume your microservices. +* Assume that we have the **Product**, **Ordering** and **Identity** microservices. +* These microservices have their own SQL Server **database** and they are also using **RabbitMQ**, **Redis** and some other **infrastructure services**. +* On the other hand, we want to develop, run or test our **Product microservice** in our **own laptop** using our favorite IDE, let’s say using Visual Studio. +* If we don’t make anything special, the **product microservice in the Kubernetes cluster** will be used by the users, as you can expect. Even if you can somehow run the product microservice in your local computer, the Kubernetes system won’t have any knowledge about it. They are in different systems. +* At this point, ABP Studio comes into play. When you **connect** to the Kubernetes cluster with ABP Studio, it first installs a **VPN server** into your cluster and a **VPN client** into your local machine. +* Then it establishes a secure **VPN tunnel** between your computer and the target Kubernetes cluster. In this way, you can access all services in Kubernetes with their internal cluster IP addresses. +* ABP Studio also installs the **ABP Studio Client Proxy Server** pod into the Kubernetes cluster, and the **ABP Studio Proxy Client** into the developer machine. It is used to collect data from the services and show them in the ABP Studio UI, like HTTP Requests, exceptions, or logs as we’ve seen in the solution runner before. +* Finally, ABP Studio also adds **DNS records to your hosts file**, so you can access to internal Kubernetes services directly with their service names, in addition to their IP addresses. + +All of these happen when you click the Connect button on the ABP Studio. Now, your computer can use the **internals of the Kubernetes cluster**. But, how the HTTP Requests coming to the Product service in the Kubernetes cluster are **redirected to your local machine**? + +* When you want to run and test a service locally, you **intercept the matched service** in the Kubernetes cluster. When you Intercept a service, ABP Studio makes some more changes in your local computer and in your Kubernetes cluster. +* As first, it installs a **pod** and a **service** into the Kubernetes cluster to intercept the requests coming to the Product microservice and **proxies the requests to** a client application in **your local computer**. +* The local client application then **forwards requests** to the Product microservice instance you are running in your local machine. In this way, whenever the Product service is used in Kubernetes, your local product service is executed. You can easily run, test or debug your service as you normally do with your standard IDE, for example with Visual Studio. +* What happens when your local product service needs to **access** the SQL Server database or RabbitMQ, or another microservice in the Kubernetes cluster? It can **directly use** them just like local services, through the **VPN tunnel** we have already created. +* ABP Studio makes a final change in your local product microservice project: It overrides all the **environment variables** with the ones obtained from the product service in the Kubernetes pod. In this way, your local product service instance feels itself in the Kubernetes cluster. Database connection strings and all other settings will be the same with the Kubernetes environment. + +Don’t worry, ABP Studio **doesn’t change your local environment variables**. The change only affects the live product service instance, and it is **reverted** when you disable the interception in ABP Studio. Also, when you click the **Disconnect** button in ABP Studio, all the changes made to your cluster and your local computer will be cleared. It won’t leave any sign in your systems. + +### ABP Studio Kubernetes Tunnel Demo + +So, now we have a fully Kubernetes integrated development environment. Let’s see how it is used in ABP Studio in the following 9-minutes demo: + + + +[Click here to watch the demo on YouTube](https://www.youtube.com/watch?v=CeUq2ysz-mQ) + +## ABP Studio Roadmap + +In the next months, the team will be working on the following items: + +* Our first goal is to **finalize and stabilize** the current features. We will also **document** how to use them. Only after that, we will open it to customers as a beta version. +* We’ve focused on the development part until now. We also want to add some **deployment** capabilities to ABP Studio in the future. +* Another goal is to make **module customizations** much easier than current by the help of ABP Studio. With ABP Studio, we have completely re-though how to discover and install modules. Based on that, we will also work on a common place to publish and consume application modules for the ABP Framework. + +We have other great plans for that product. However, I can not declare them yet as they are secrets for now :) We’ve planned to release the first beta version in **Q3 of 2023**. + +I want to notice that ABP Studio is not a new version or replacement of **ABP Suite**. We built the ABP Studio from scratch. Both products will be developed and shipped in parallel. ABP Suite will continue to focus on code generation. ABP Studio doesn’t have any code generation capabilities yet. So, you will use both of them together. + +## Summary + +Okay let’s summarize what I’ve explained in this article: + +* First, I explained **why it is hard to set up a microservice development environment**. We’ve talked about the hardness of developing, running and testing a single microservice that depends on infrastructure services and other microservices. +* I’ve introduced **Project Tye**, a project developed by Microsoft to allow you to easily run multi-application solutions. We made a demo, then discussed its missing points. +* Then I **introduced ABP Studio**, a new product by Volosoft for ABP developers. + As the first important feature, I explained the ABP Studio **Solution Runner** and demonstrated how it works and how you can develop and debug your services. +* Finally, I introduced ABP Studio’s **Kubernetes Tunneling** feature. First, I explained how it works with a complicated diagram. Then I made a short demo to see it in action. + +With that final part, we had a **great and easy to use microservice development environment**. It is great, because we can focus on only a single service, while we don’t care about all other parts of the solution. Also, we can save our local development machine system resources by delegating running the dependencies to a remote Kubernetes server. + +## See Also + +* ABP Dotnet Conf'23 Talk on YouTube: [Kubernetes Integrated Microservice Development with ABP Studio](https://www.youtube.com/watch?v=XiPRcIHJ3NE) \ No newline at end of file diff --git a/docs/en/Migration-Guides/Abp-7_3.md b/docs/en/Migration-Guides/Abp-7_3.md new file mode 100644 index 0000000000..9e09306ca3 --- /dev/null +++ b/docs/en/Migration-Guides/Abp-7_3.md @@ -0,0 +1,28 @@ +# ABP Version 7.3 Migration Guide + +This document is a guide for upgrading ABP v7.2 solutions to ABP v7.3. There are a few changes in this version that may affect your applications, please read it carefully and apply the necessary changes to your application. + +## OpenIddict - Refactoring of `ClaimsPrincipal` + +There are some changes that you might need to fix in your code. You can see the following list of the required changes: + +* `AbpOpenIddictClaimDestinationsManager` was renamed as `AbpOpenIddictClaimsPrincipalManager`. +* Use `AbpOpenIddictClaimsPrincipalManager.HandleAsync` instead of `AbpOpenIddictClaimDestinationsManager.SetAsync`, which is removed. +* `AbpDefaultOpenIddictClaimDestinationsProvider` was renamed as `AbpDefaultOpenIddictClaimsPrincipalHandler`. +* `IAbpOpenIddictClaimDestinationsProvider` was renamed as `IAbpOpenIddictClaimsPrincipalHandler`. +* Use `IAbpOpenIddictClaimsPrincipalHandler.HandleAsync` instead of `IAbpOpenIddictClaimDestinationsProvider.SetAsync`, which is removed. +* `AbpOpenIddictClaimDestinationsOptions` was renamed as `AbpOpenIddictClaimsPrincipalOptions`. + +Please check [this PR](https://github.com/abpframework/abp/pull/16537) if you encounter any problems related to OpenIddict Module. + +## Nonce attribute support for Content Security Policy (CSP) + +ABP Framework supports adding unique value to nonce attribute for script tags which can be used by Content Security Policy to determine whether or not a given fetch will be allowed to proceed for a given element. In other words, it provides a mechanism to execute only correct script tags with the correct nonce value. + +> See the [Security Headers](../UI/AspNetCore/Security-Headers.md) documentation for more information. + +This feature comes with a small restriction. If you use any C# code used inside the script tag, it may cause errors (Because a new `NonceScriptTagHelper` has been added, and it replaces script tags in the HTML contents). + +For example, `` will no longer work. However, you can use the C# code for an attribute of script tag, for example, `` is completely valid and won't cause any problem. + +> Note: You should not use any C# code used inside the script tag, even if you don't use this feature. Because it might cause errors. \ No newline at end of file diff --git a/docs/en/Migration-Guides/Index.md b/docs/en/Migration-Guides/Index.md index 7d85d3f46f..c87004cfb5 100644 --- a/docs/en/Migration-Guides/Index.md +++ b/docs/en/Migration-Guides/Index.md @@ -2,6 +2,7 @@ The following documents explain how to migrate your existing ABP applications. We write migration documents only if you need to take an action while upgrading your solution. Otherwise, you can easily upgrade your solution using the [abp update command](../Upgrading.md). +- [7.2 to 7.3](Abp-7_3.md) - [7.1 to 7.2](Abp-7_2.md) - [7.0 to 7.1](Abp-7_1.md) - [6.0 to 7.0](Abp-7_0.md) diff --git a/docs/en/UI/Angular/Authorization.md b/docs/en/UI/Angular/Authorization.md index 1bde885180..448a83e0cd 100644 --- a/docs/en/UI/Angular/Authorization.md +++ b/docs/en/UI/Angular/Authorization.md @@ -32,7 +32,7 @@ According to this flow, the user is redirected to an external login page which i ### Resource Owner Password Flow -If you implemented the [Angular UI account module](./Account-Module) to your project, you can switch the flow to resource owner password flow by changing the OAuth configuration in the _environment.ts_ files as shown below: +If you have used the [Angular UI account module](./Account-Module) in your project, you can switch to the resource owner password flow by changing the OAuth configuration in the _environment.ts_ files as shown below: ```js import { Config } from '@abp/ng.core'; diff --git a/docs/en/UI/AspNetCore/Security-Headers.md b/docs/en/UI/AspNetCore/Security-Headers.md index b02e9691b0..dad20089a6 100644 --- a/docs/en/UI/AspNetCore/Security-Headers.md +++ b/docs/en/UI/AspNetCore/Security-Headers.md @@ -74,3 +74,26 @@ Configure(options => }); }); ``` + +### Ignore Abp Security Headers + +You can ignore the Abp Security Headers for some actions or pages. You can use the `IgnoreAbpSecurityHeaderAttribute` attribute for this. + +**Example:** + +```csharp +@using Volo.Abp.AspNetCore.Security +@attribute [IgnoreAbpSecurityHeaderAttribute] +``` + +**Example:** + +```csharp +[IgnoreAbpSecurityHeaderAttribute] +public class IndexModel : AbpPageModel +{ + public void OnGet() + { + } +} +``` \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs index c9b0738619..b1068bbe85 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/AbpSecurityHeadersMiddleware.cs @@ -33,11 +33,19 @@ public class AbpSecurityHeadersMiddleware : IMiddleware, ITransientDependency var requestAcceptTypeHtml = context.Request.Headers["Accept"].Any(x => x.Contains("text/html") || x.Contains("*/*") || x.Contains("application/xhtml+xml")); + + var endpoint = context.GetEndpoint(); + + if (endpoint?.Metadata.GetMetadata() != null) + { + await next.Invoke(context); + return; + } if (!requestAcceptTypeHtml || !Options.Value.UseContentSecurityPolicyHeader || await AlwaysIgnoreContentTypes(context) - || context.GetEndpoint() == null + || endpoint == null || Options.Value.IgnoredScriptNoncePaths.Any(x => context.Request.Path.StartsWithSegments(x.EnsureStartsWith('/')))) { AddOtherHeaders(context); @@ -111,7 +119,7 @@ public class AbpSecurityHeadersMiddleware : IMiddleware, ITransientDependency var nonceStr = $" 'nonce-{nonceValue}'"; - var scriptSrcValue = Options.Value.ContentSecurityPolicyValue.Split(';') + var scriptSrcValue = Options.Value.ContentSecurityPolicyValue?.Split(';') .FirstOrDefault(x => x.Trim().StartsWith(ScriptSrcKey))?.Trim(); if (scriptSrcValue.IsNullOrWhiteSpace()) diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/IgnoreAbpSecurityHeader.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/IgnoreAbpSecurityHeader.cs new file mode 100644 index 0000000000..fb9e7717f3 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Security/IgnoreAbpSecurityHeader.cs @@ -0,0 +1,9 @@ +using System; + +namespace Volo.Abp.AspNetCore.Security; + +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] +public class IgnoreAbpSecurityHeaderAttribute : Attribute +{ + +} diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs index fec1136204..ca5f5ceb61 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs @@ -26,6 +26,7 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase { case DatabaseProvider.NotSpecified: case DatabaseProvider.EntityFrameworkCore: + context.Symbols.Add("EFCORE"); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Mvc.Mongo")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Host.Mongo")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor.Server.Mongo")); @@ -50,6 +51,7 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase switch (context.BuildArgs.UiFramework) { case UiFramework.Angular: + context.Symbols.Add("ui:angular"); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Mvc")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor.Server")); steps.Add(new ProjectRenameStep("MyCompanyName.MyProjectName.Host", "MyCompanyName.MyProjectName")); @@ -65,6 +67,7 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase break; case UiFramework.Blazor: + context.Symbols.Add("ui:blazor"); steps.Add(new RemoveFolderStep("/angular")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Mvc")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor.Server")); @@ -83,6 +86,7 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase break; case UiFramework.BlazorServer: + context.Symbols.Add("ui:blazor-server"); steps.Add(new RemoveFolderStep("/angular")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Mvc")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Host")); @@ -92,6 +96,7 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase case UiFramework.NotSpecified: case UiFramework.Mvc: + context.Symbols.Add("ui:mvc"); steps.Add(new RemoveFolderStep("/angular")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Host")); steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.Blazor.Server")); diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/JsonAuditSerializer_Test.cs b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/JsonAuditSerializer_Test.cs index eb9dec3b5e..648325862a 100644 --- a/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/JsonAuditSerializer_Test.cs +++ b/framework/test/Volo.Abp.Auditing.Tests/Volo/Abp/Auditing/JsonAuditSerializer_Test.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text.Json.Serialization; using Microsoft.Extensions.DependencyInjection; using Shouldly; using Xunit; @@ -58,7 +57,6 @@ public class JsonAuditSerializer_Test : AbpAuditingTestBase [DisableAuditing] public string Password { get; set; } - [JsonIgnore] public string PrivateEmail { get; set; } public DateTime Birthday { get; set; } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml index 1ebf445f05..cc37c15c89 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml @@ -147,27 +147,32 @@ }
-
- - @if (Model.Post.Writer.Name != null && Model.Post.Writer.Surname != null) - { -

@Model.Post.Writer.Name @Model.Post.Writer.Surname

- } - else + @if (Model.Post.Writer != null) + { +
+ + + @if (Model.Post.Writer.Name != null && Model.Post.Writer.Surname != null) + { +

@Model.Post.Writer.Name @Model.Post.Writer.Surname

+ } + else + { +

@Model.Post.Writer.UserName

+ } +
+
+
+ @if (Model.Post.Writer.JobTitle != null) { -

@Model.Post.Writer.UserName

+

@Model.Post.Writer.JobTitle

} - -
-
- @if (Model.Post.Writer.JobTitle != null) - { -

@Model.Post.Writer.JobTitle

- } -
- @if (CurrentUser.UserName == Model.Post.Writer.UserName) +
+ } + + @if (CurrentUser.Id.HasValue && CurrentUser.Id.Value == Model.Post.Writer?.Id) { - @L["EditProfile"] + @L["EditProfile"] } @if (Model.LatestPosts.Count > 1) @@ -185,23 +190,24 @@