Skip to content

Instantly share code, notes, and snippets.

- yum install docker
- in /etc/sysconfig/docker
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --debug=true -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock'
- service docker restart
- In satellite/katello create a new compute resource with the followiung settings
Provider Docker
URL http://0.0.0.0:2375
[vagrant@obelix hammer-cli-katello]$ sudo cat /etc/crane.conf
# =========================
# Pulp Crane Configuration
# =========================
[general]
debug: false
data_dir_polling_interval: 60
data_dir: /var/lib/pulp/published/docker/v2/app
endpoint: obelix.example.com:5000
Foreman::UserColumns.map do |mapper|
mapper.resource :subscriptions do |resource|
resource.column :account, :description => N_("Account"),
:path => "account_number",
:default_enabled => true
resource.column :contract, :description => N_("Contract"),
:path => "contract_number",
:default_enabled => true
From 18c72def9f0372be0b20b62b928ea383a7929b2b Mon Sep 17 00:00:00 2001
From: Partha Aji <[email protected]>
Date: Wed, 11 Apr 2018 22:21:41 +0000
Subject: [PATCH] PR - 1100
---
extensions/admin/repo_options.py | 3 ++-
plugins/importers/yum/sync.py | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
@parthaa
parthaa / gist:36ead0ff6962d6dac33412a1c38e94f7
Last active May 21, 2018 18:58
Usage of the Foreman Table Preferences
$ curl -k -u admin:changeme -H "Content-Type: application/json" -X POST -d '{"name":"Katello::Pool", "columns":["name", "entitlements"]}' "https://localhost/api/v2/users/4/table_preferences"
{"id":1,"name":"Katello::Pool","columns":["name","entitlements"],"created_at":"2018-05-21 18:48:12 UTC","updated_at":"2018-05-21 18:48:12 UTC"}
$ curl -k -u admin:changeme -H "Content-Type: application/json" -X GET "http://localhost:3000/api/v2/users/4/table_preferences"
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
diff --git a/job_templates/run_command_-_ansible_default.erb b/job_templates/run_command_-_ansible_default.erb
index 1ff81d0..19e6494 100644
--- a/job_templates/run_command_-_ansible_default.erb
+++ b/job_templates/run_command_-_ansible_default.erb
@@ -9,15 +9,35 @@ template_inputs:
input_type: user
description: "Command to run on the host, e.g: \r\n\r\nmkdir helloworld"
advanced: false
+- name: pre_script
+ description: A script to run prior to the package action
>>> class Foo(object):
... def __init__(self):
... self.foo = 100
... def get_cost(self):
... return self.foo
...
>>> Foo().get_cost()
100
>>> Foo.get_cost(Foo())
100
@parthaa
parthaa / this.js
Last active December 5, 2018 16:42
All about this
class Foo {
constructor() {
this.title = "foo";
}
say() {
console.log(this.title);
}
}
> bar = new Foo()
for(let i = 0; i< 3;i++) {
//Log i after a second
setTimeout(function() {
console.log(i);
}, 1000);
}
console.log("Numbers Coming")
output:
JS
1) let vs const
2) closure
3) classes, prototype, inheritance
4) promises
5) fetch api
6) async await
7) Arrow functions
8) es6 Modules
9) Template string