Skip to content

Instantly share code, notes, and snippets.

View lucassrg's full-sized avatar

Lucas Gomes lucassrg

View GitHub Profile
@lucassrg
lucassrg / app_catalog_subscription.py
Created March 13, 2020 06:17
Marketplace App Catalog Subscription
# coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This script subscribes to a Marketplace listing by accepting all terms and conditions and list all subscriptions
#
#
#
import oci
compartment_id = "ocid1.compartment."
@lucassrg
lucassrg / mp_subscription.py
Created March 13, 2020 05:17
subscribe to marketplace listing
# coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This script subscribes to the default package of a Marketplace listing by accepting all terms and conditions and list all subscriptions
#
#
#
#
import oci
@lucassrg
lucassrg / openssl_commands.md
Created September 23, 2019 17:22 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@lucassrg
lucassrg / ol_7-install_oci_cli.sh
Created October 25, 2018 08:18
Install OCI CLI on OL 7
#!/bin/bash
sudo yum -y install yum-utils
sudo yum-config-manager --enable ol7_developer
sudo yum -y install python-oci-sdk python-oci-cli
@lucassrg
lucassrg / ngnix_cloud-init-userdata.sh
Created May 29, 2018 18:47
Sample Cloud-init userdata script for setting up NGNIX with SSL Certificate
#!/bin/bash
###############################
# Input variables #
##############################
DOMAIN=mysite.com
CERTS_ROOT_DIR=/etc/ssl
#Zip file containing the SSL certificate bundle
# Content of the zip file:
@lucassrg
lucassrg / install_apache.sh
Created March 20, 2018 06:13
Install Apache on OL7.x
#!/bin/bash
yum install -y httpd
systemctl enable httpd.service
systemctl start httpd.service
echo '<html><head></head><body><pre><code>' > /var/www/html/index.html
hostname >> /var/www/html/index.html
echo '' >> /var/www/html/index.html
@lucassrg
lucassrg / ol_7-install_kvm.sh
Last active June 1, 2018 18:13
Oracle Linux 7.x - Install KVM server with GUI support via VNC
#!/bin/bash
##Install KVM, Dependencies & utils
yum -y install qemu-kvm qemu-img virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer oci-utils
yum groupinstall "Server with GUI" -y
##Install VNC Server
yum install xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils tigervnc-server mesa-libGL mesa-libEGL -y
@lucassrg
lucassrg / main.tf
Created October 20, 2017 04:54
Terraform template vcn
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "compartment_ocid" {}
variable "region" {}
variable "ssh_public_key_path" {}
variable "ssh_private_key_path" {}
variable "availability_domain" {}
variable "instance_shape" {}
@lucassrg
lucassrg / instance.tf
Created October 19, 2017 21:49
Terraform Instance count for OCI provider
#OCI Environment variables
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "compartment_ocid" {}
variable "region" {}
variable "ssh_public_key_path" {}
variable "ssh_private_key_path" {}
variable "availability_domain" {}
variable "instance_shape" {}
@lucassrg
lucassrg / opc-userdata-hello-win2012.ps1
Last active July 18, 2017 23:10
Oracle Compute Cloud Userdata Bootstrap file
#Powershell script
#Set-ExecutionPolicy RemoteSigned
Set-ExecutionPolicy Unrestricted
#Set-ExecutionPolicy -executionpolicy remotesigned -force
New-Item C:\helloworld.txt -ItemType File -Value "Hello, world!"