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
/* | |
Last update : March, 2020 | |
Author: cetin.ardal | |
Description: Add OCI API key to specified user. | |
*/ | |
# OCI Home Region | |
provider "oci" { | |
tenancy_ocid = var.tenancy_ocid | |
user_ocid = var.user_ocid |
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
#!/bin/sh | |
# Last update : March, 2020 | |
# Author: cetin.ardal | |
# Description: Generate RSA key for OCI API usage and upload it to specified user. | |
COLOR_TITLE="\033[32m" # green | |
COLOR_TITLE1="\033[91m" # light red | |
COLOR_NORMAL="\033[39m" |
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
#!/bin/sh | |
# Last update : February, 2020 | |
# Author: cetin.ardal@oracle.com | |
# | |
# This script auto-configure your Fn CLI context on OCI Cloud Shell. | |
# 1. On OCI Console, create an OCIR repository named like your tenant | |
# 2. Then just run this one-liner at the Cloud Shell prompt: | |
# | |
# sh <( curl -L http://xxx.xxx/xxxxxx ) |
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
{ | |
"variables": { | |
"tenancy_ocid": "null", | |
"compartment_ocid": "null", | |
"user_ocid": "null", | |
"fingerprint": "null", | |
"key_file": "null", | |
"region": "null", | |
"base_image_ocid": "null", | |
"image_name": "null", |
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
# Quick powershell script to : | |
# Get the IPv4 and send it using gmail smtp server. Handy when there is no local SMTP server available | |
# !! Warning !! You need to provide your credentials in plain text ... | |
$date = (get-date).ToString() | |
# Get IPv4. Quick filter with -like "1*" to exclude IPv6. There should be a better way to do it ... | |
$IP = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -filter "ipenabled=true" | | |
Where { $_.IPAddress -like "1*"} | | |
Select -ExpandProperty IPAddress | select -First 1 |