I would like to run WSO2 on two hosts, one serves as manager and the other as gateway worker.
I consulted the clustering guide and product profiles documentation, and I understand that after configuring the two hosts correctly, I can run the product with selected profile:
-Dprofile=gateway-manager on the manager node
-Dprofile=gateway-worker on the gateway worker node
In addition to perform selective-run, I would also like the gateway-worker to have the minimal possible deployment, i.e. to be installed only with artifacts it really needs.
Three options I can think of, from best to worst:
Download a minimized deployment package - in case there is one? In the site I saw only complete package which contains artifacts of all the components. Are there other download options which contain selective artifacts per profile?
Download the complete package and then remove the artifacts which are not necessary for gateway-worker (how do I know which files/directories to remove?)
Download the source from github and run a selective build? (which components should I build and how do I package them for deployment)?
There are no separate product packs for each profiles to download. So option 1 is not there. But you can do the option 2 to some extent. You can remove the publisher, store and admin-dashboard application from the product by removing 'jaggeryapps' folder in 'wso2am-1.10.0/repository/deployment/server/' location. Other than that we are not recommending to remove any components from the pack.
You can check the profile generation code for API Manager 1.10 in here. It only has module import definitions. These component are needed to be there for each profile.
Related
I am looking into Cloud Run to host my new app, and I am wondering if it is possible to generate a separate URL for each git branch.
I use Netlify to host my other app. When it is connected to GitHub (or other VCS services), it builds the source code in a branch and deploy it to a URL that is specific to the branch.
Can it be done easily or do I have to write some logic?
Or do you think AWS amplify or some other services are of better fit?
The concept of Cloud Run and URLs is quite simple:
https://<service-name>-<project hash>.<region>.run.app
If your project and region are the same for all the branches, you simply have to deploy a different service for each branch to get a different URL.
That was for Cloud Run. Now, I'm not sure that Netlify is compliant with Cloud Run. I found no documentation on this.
This answer won't be directly useful to you but I think it's relevant and worth mentioning
The open source Knative API (and implementation actually exposes a "tag" feature while splitting the traffic between multiple revisions: https://github.com/knative/docs/blob/master/docs/serving/spec/knative-api-specification-1.0.md#traffictarget
This feature is not currently supported on Cloud Run fully managed, but it will be.
By tagging releases this way, you could define tag: v1 and tag: v2 in your traffic configuration, and you would get new URLs like:
https://v1-SERVICE_NAME...run.app
https://v2-SERVICE_NAME...run.app
that directly go to these specific versions.
And the interesting thing is, these revisions you specified in the traffic: block of the Service object do not have to receive any traffic (you can say traffic percentage: 0) but it would still create a domain name like I showed above to the inactive revisions of your app.
So when Cloud Run fully-managed supports tag fields, you can actually achieve this, although it will be less out-of-the-box experience than Netlify.
In some of my application I have to manage environment specific attributes / variables like:
- folder path
- rest api urls
- credentials
- ...
At the moment I'm manually setting variables in the configuration registry of each server. This is quite heavy when you've to deploy a new server because you've to recreate everything manually (I haven't find a way to initialize the repository from an xml file for instance)
I've seen different approaches like
- writing different version of the endpoints, sequences,... and create different car for distribution on each environment
- Using local registry with different entries
- Using governance registry (I've no experience with this)
What is according to you the best approach for this?
Thanks for helping
You can find the best practices guide for WSO2 Enterprise Integrator (ESB, DSS, BPS and MB) at [1]. It also explains how to manage environment specific variables.
[1] https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Best+Practices
Finally what I've done (and what is working since some weeks now) is for each of my project :
Create a "master" maven project that will contain:
An ESB project
One registry project per environment that contains all environment dependant variables (like hosts, passwords, paths, ...)
One Composite Application project per environment that will package the ESB project with the correct registry values (Note that if you deploy everything in the ESB event the registry project must be considered as a "EnterpriseServiceBus" Role)
Next step will be to integrate everything in jenkins and automatize the building of car with maven.
I want to get all the artifact names on a particular group name in my nexus repository.
I have tried lucene web api for this. like i used a url like,
http://localhost:8080/nexus/service/local/lucene/search?g=my.group.name
But on the xml response I see the it is listed the artifact from index section, which contains the deleted artifacts also. I don't want the deleted artifact names.
How can I achieve this. Is there any we api supports this?
You can write a small plugin to retrieve the GAV's. The "crawling" example from this location does pretty much what you need already:
https://github.com/sonatype/nexus-example-plugins/
The ArtifactDiscoveryListener.java is called for every GAV in a repository. The plugin contributes a scheduled task, so it's easy to run.
You can find more information about developing plugins here:
https://books.sonatype.com/nexus-book/reference/plugdev.html
I am building out a Sitecore farm with multiple Content Delivery servers. In the current process, I stand up the CD server and go through the manual steps of commenting out connection strings and enabling or disabling config files as detailed here per each virtual machine/CD server:
https://doc.sitecore.net/Sitecore%20Experience%20Platform/xDB%20configuration/Configure%20a%20content%20delivery%20server
But since I have multiple servers, is there any sort of global configuration file where I could dictate the settings I want (essentially a settings template for CD servers), or a tool where I could load my desired settings/template for which config files are enabled/disabled etc.? I have used the SIM tool for instance installation, but unsure if it offers the loading of a pre-determined "template" for a CD server.
It just seems in-efficient to have to stand up a server then config each one manually versus a more automated process (ex. akin to Sitecore Azure, but in this case I need to install the VMs on-prem).
There's nothing directly in Sitecore to achieve what you want. Depending on what tools you are using then there are some options to reach that goal though.
Visual Studio / Build Server
You can make use of SlowCheetah config transforms to configure non-web.config files such as ConnetionStrings and AppSettings. You will need a different build profiles for each environment you wish to create a build for and add the appropriate config transforms and overrides. SlowCheetah is available as a nuget package to add to your projects and also a Visual Studio plugin which provides additional tooling to help add the transforms.
Continuous Deployment
If you are using a continuous deployment tool like Octopus Deploy then you can substitute variables in files on a per environment and machine role basis (e.g. CM vs CD). You also have the ability to write custom PowerShell steps to modify/transform/delete files as required. Since this can also run on a machine role basis you can write a step to remove unnecessary connection strings (master, reporting, tracking.history) on CD environments as well as delete the other files specified in the Sitecore Configuration Guide.
Sitecore Config Overrides
Anything within the <sitecore> node in web.config can be modified and patch using Include File Patching Facilities built into Sitecore. If you have certain settings which need to be modified or deleted for a CD environment then you can create a CD-specific override, which I place in /website/App_Config/Include/z.ProjectName/WebCD and use a post-deployment PowrrShell script in Octopus deploy to delete this folder on CM environment. There are example of patches within the Include folder, such as SwitchToMaster.config. In theory you could write a patch file to remove all the config sections mentioned in the depoyment guide, but it would be easier to write a PowerShell step to delete these instead.
I tend to use all the above to aid in deploying to various environments for different server roles (CM vs CD).
Strongly recommend you take a look at Desired State Configuration which will do exactly what you're talking about. You need to set up the actual configuration at least once of course, but then it can be deployed to as many machines as you'd like. Changes to the config are automatically flowed to all machines built from the config, and any changes made directly to the machines (referred to as configuration drift) are automatically corrected. This can be combined with Azure, which now has capability to act as a "pull-server" through the Automation features.
There's a lot of reading to do to get up to speed with this feature-set but it will solve your problem.
This is not a Sitecore tool per se.
Wso2 EMM 2.0 building from source ,
reference link https://docs.wso2.com/display/EMM200/Building+from+Source#BuildingfromSource-Downloadingthesource
Device and Policy management (Core functionality) - https://github.com/wso2/carbon-device-mgt (MASTER Branch)
Plugins specific device management (Eg : Android, Windows) - https://github.com/wso2/carbon-device-mgt-plugins (MASTER Branch)
EMM product repo - https://github.com/wso2/product-mdm (MASTER Branch)
successfully build the product , the EMM 2.0 found <EMM_SOURCE_HOME>/modules/distribution/target directory, as wso2mdm-2.0.0-SNAPSHOT.zip. when i extract and started the server ,server started but when i try to access
Publisher -localhost:9443/publisher/ not able to access the publisher ,
when i try to access Store - localhost:9443/store/ not able to access store but it redirects to publiser url .
Usually master branch is the place the current developments are being committed. So there could be a chance to have bugs which could affect to application functionality. Anyway if you need to build specific version of product from the source, it is better to checkout relevant tag first and build the tag. In your case it is https://github.com/wso2/product-emm/tree/v2.0.0
Also to build product from source, you don't need to build entire list of depended repositories (i.e carbon-device-mgt, carbon-device-mgt-plugins) unless you are going to build the product based on modified code, which is not in master branch or tags. Because WSO2 has nexus repository hosted and it has all required dependencies, which is needed to build the product. However if you would like to build product based on another branch of a depended repository, then you need to build the relevant branches of those depended repositories.
Thanks