Skip to content

Instantly share code, notes, and snippets.

View hadoan's full-sized avatar
🏠
Working from home

Ha Doan hadoan

🏠
Working from home
View GitHub Profile
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY . .
RUN ls
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
export function newContainerRegistry(resourceGroup: azure.core.ResourceGroup){
const registry = new azure.containerservice.Registry("DemoMicroserviceRegistry", {
name: "DemoMicroserviceRegistry",
resourceGroupName: resourceGroup.name,
sku: "basic",
adminEnabled: true
});
export function newSqlServer(resourceGroup: azure.core.ResourceGroup) {
const serverName = DeploymentConsts.APP_NAME + "-sql-server";
return new azure.sql.SqlServer(serverName, {
name: serverName,
resourceGroupName: resourceGroup.name,
administratorLogin: dbUserName,
administratorLoginPassword: dbUserPwd,
version: "12.0",
});
[Fact]
public void Find_searches_url()
{
var options = new DbContextOptionsBuilder<BloggingContext>()
.UseInMemoryDatabase(databaseName: "Find_searches_url")
.Options;
// Insert seed data into the database using one instance of the context
using (var context = new BloggingContext(options))
{
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
---
################################################################################
#
# Section: Organizations
#
#
# Copyright 2018 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
kubectl get secret your-cluster-name-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode; echo
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: default
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
@hadoan
hadoan / kibana.yaml
Created March 21, 2020 03:49
Kibana deploymen
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana-name
spec:
version: 7.6.1
count: 1
elasticsearchRef:
name: your-cluster-name
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: your-cluster-name
spec:
version: 7.6.1
nodeSets:
- name: default
count: 1
config: