Skip to content

Instantly share code, notes, and snippets.

View karthikeayan's full-sized avatar
🎯
Focusing

Karthikeyan karthikeayan

🎯
Focusing
View GitHub Profile
@karthikeayan
karthikeayan / aws-cross-account-assume-role.txt
Last active October 15, 2020 18:42
AWS Assume Role Steps
For example, Account A needs to push docker images to Account B:
High level steps:
* Trust relationship will tell from where the request is originating
* Policy will tell what access the role has
* Account B's role will have trust relationship to Account A
* Account B's role will have access to push the image to ECR
* Account A's role will have trust relationship to EC2(as request is originating from EC2(jenkins))
@karthikeayan
karthikeayan / cross_account_ecr_pull.txt
Created October 15, 2020 18:46
Allow other AWS Accounts to pull images from ECR
Account A needs to pull images on Account B:
On Account A:
* Create a role in Account A
* Add policy which as ECR read access
On Account B:
* Create ECR Repository
* Add policy to the ECR Repository as below under permissions and replace <AccountA_ID>
{
@karthikeayan
karthikeayan / fargate-delpoy-from-jenkins.txt
Last active October 18, 2020 18:30
fargate-deploy-from-jenkins-scheduled-task
cat <<EOF >taskdef.json
{
"family": "v1-taskDefintion",
"containerDefinitions": [
{
"name": "${microservice_name}",
"image": "${docker_repo_uri}/${microservice_name}:${tag}”,
"portMappings": [
{
"containerPort": ${containerPort},
@karthikeayan
karthikeayan / ecs-shell.sh
Created December 12, 2021 15:06
Get shell of a container running on as a ECS Task
#!/usr/local/bin/bash
echo Enter Cluster Name:
read -e cluster_name
echo Enter Container Name:
read -e container_name
echo Enter Service Name:
read -e service_name
@karthikeayan
karthikeayan / flowise-openwebui-ollama-docker-compose.yaml
Created March 15, 2025 17:28
flowise-openwebui-ollama-docker-compose
services:
flowise:
image: flowiseai/flowise
restart: always
environment:
- PORT=3001
- FLOWISE_USERNAME=${FLOWISE_USERNAME}
- FLOWISE_PASSWORD=${FLOWISE_PASSWORD}
ports:
- "3001:3001"