This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cordon all nodes: | |
kubectl get nodes | ForEach-Object{($_.Split(""))[0]} | where {$_ -ne " NAME"} | ForEach-Object{(kubectl cordon $_)} | |
Rollout Master node: | |
kubectl get deployments -n kube-system| ForEach-Object{($_.Split(""))[0]} | where {$_ -ne " NAME"} | ForEach-Object{(kubectl -n kube-system rollout restart deployment $_)} | |
kubectl get daemonsets -n kube-system| ForEach-Object{($_.Split(""))[0]} | where {$_ -ne " NAME"} | ForEach-Object{(kubectl -n kube-system rollout restart daemonset $_)} | |
Rollout Worker nodes: | |
kubectl get deployments | ForEach-Object{($_.Split(""))[0]} | where {$_ -ne " NAME"} | ForEach-Object{(kubectl rollout restart deployment $_)} | |
kubectl get daemonsets | ForEach-Object{($_.Split(""))[0]} | where {$_ -ne " NAME"} | ForEach-Object{(kubectl rollout restart daemonset $_)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
stages{ | |
stage('Logging into AWS ECR'){ | |
steps{ | |
bat 'aws eks --region us-east-1 update-kubeconfig --name eks-cluster-name' | |
bat 'aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin xxxxxxxxxxx.xxx.ecr.us-east-1.amazonaws.com' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Function Get-AllSxaSite | |
$sites = New-Object System.Collections.ArrayList | |
class ItemDetail { | |
[string]$ID | |
[string]$Name | |
[string]$Path | |
[bool]$Cacheable | |
[bool]$ClearOnIndexUpdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-ChildItem Cert:\LocalMachine\My\ | |
Get-ChildItem Cert:\LocalMachine\My\ | Select-Object NotAfter, Subject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static T GetValueFromSiteSettings<T>(IMvcContext mvcSiteContext, string TenantSiteSettingsTemplateId) | |
{ | |
var query = "/sitecore/content//*[@@ID='" + mvcSiteContext.GetRootItem<Item>().ID + "']/*[@@templateId='" + TenantSiteSettingsTemplateId + "']"; | |
var settings = mvcSiteContext.SitecoreService.Database.SelectSingleItem(query); | |
if (settings == null) | |
{ | |
return null; | |
} | |
return mvcSiteContext.SitecoreService.GetItem<T>(settings); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<index id="Coveo_pub_index" type="Coveo.SearchProvider.ProviderIndex, Coveo.SearchProvider" patch:before = "*[3]"> | |
<param desc="p_Name">$(id)</param> | |
<configuration ref="coveo/defaultIndexConfiguration" /> | |
<locations hint="list:AddCrawler"> | |
<crawler name="ContentCrawler" type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> | |
<database>pub</database> | |
<root>/sitecore/content</root> | |
<stopOnError>true</stopOnError> | |
</crawler> | |
<crawler name="MediaLibraryCrawler" type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:env="http://www.sitecore.net/xmlconfig/env/"> | |
<sitecore> | |
<log4net> | |
<appender name="MySite.Feature.Products" type="log4net.Appender.RollingFileAppender, Sitecore.Logging"> | |
<file value="$(dataFolder)/logs/MySite.Feature.Products.log.{date}.txt" /> | |
<appendToFile value="true" /> | |
<rollingStyle value="Size" /> | |
<maximumFileSize value="10MB" /> | |
<maxSizeRollBackups value="-1" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace MySite.Foundation.Common | |
{ | |
public interface ILoggerService | |
{ | |
#region Debug | |
void Debug(string message); | |
void Debug(string message, Exception ex); | |
#endregion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE | |
[aspnet_Membership] | |
SET | |
[Password]='qOvF8m8F2IcWMvfOBjJYHmfLABc=', | |
[PasswordSalt]='OM5gu45RQuJ76itRvkSPFw==', | |
[IsApproved] = '1', | |
[IsLockedOut] = '0' | |
WHERE | |
UserId IN ( | |
SELECT UserId FROM dbo.aspnet_Users WHERE UserName = 'sitecore\Admin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
<sitecore> | |
<settings> | |
<setting name="AllowDuplicateItemNamesOnSameLevel" value="true" /> | |
</settings> | |
</sitecore> | |
</configuration> |
NewerOlder