-
Install Vagrant
-
Install SmartOS guest detection
vagrant plugin install vagrant-smartos-guest
- Install zones support
execute <<-EOSQL | |
CREATE SEQUENCE #{schema}.id_generator_seq; | |
CREATE OR REPLACE FUNCTION #{schema}.current_shard_id(OUT result int) AS $$ | |
BEGIN | |
result := #{shard_id}; | |
END; | |
$$ LANGUAGE PLPGSQL; |
require 'active_record/connection_adapters/postgresql_adapter' | |
module ActiveRecord | |
module ConnectionAdapters | |
class TableDefinition | |
def references(*args) | |
options = args.extract_options! | |
polymorphic = options.delete(:polymorphic) | |
index_options = options.delete(:index) | |
args.each do |col| |
common: &common | |
adapter: postgresql | |
host: 127.0.0.1 | |
port: 5432 | |
username: ******* | |
password: ******* | |
encoding: unicode | |
pool: 20 | |
min_messages: WARNING | |
schema_search_path: public |
# ----------------------------- | |
# PostgreSQL configuration file | |
# ----------------------------- | |
# | |
# This file consists of lines of the form: | |
# | |
# name = value | |
# | |
# (The "=" is optional.) Whitespace may be used. Comments are introduced with | |
# "#" anywhere on a line. The complete list of parameter names and allowed |
# The built-in Rails database rake task is completely crazy, and defines methods on Object. This causes | |
# problems with Makara, which uses a delegator pattern along with method_missing. | |
require 'active_support/core_ext/object/inclusion' | |
require 'active_record' | |
class Object | |
remove_method :configs_for_environment | |
remove_method :create_database | |
remove_method :current_config |
> sudo dtrace -n '::forksys:entry / pid == $target / { printf("%d %d", arg0, arg1); }' -p 7580 | |
CPU ID FUNCTION:NAME | |
5 13517 forksys:entry 0 0 | |
5 13517 forksys:entry 0 0 | |
5 13517 forksys:entry 0 0 | |
5 13517 forksys:entry 0 0 | |
7 13517 forksys:entry 0 0 | |
0 13517 forksys:entry 0 0 | |
0 13517 forksys:entry 0 0 |
DELETE joininess-product | |
DELETE joininess-save | |
DELETE joininess-user | |
PUT joininess-product | |
PUT joininess-save | |
PUT joininess-user | |
DELETE joininess-product/_mapping/product | |
GET joininess-product/_mapping/product |
# global zone | |
MAC_ADDRESS=$(dladm show-phys -m e1000g1 | tail +2 | awk '{ print $3 }') | |
ZONENAME=$(zoneadm list | grep -v global) | |
nictagadm add external "${MAC_ADDRESS}" | |
echo '{"add_nics":[{"nic_tag":"external","ip":"dhcp"}]}' | vmadm update ${ZONENAME} | |
#!/usr/bin/dtrace | |
syscall::forksys:entry | |
/pid == $target/ | |
{ | |
self->tracing = 1; | |
} | |
syscall::forksys:return | |
/pid == $target/ |
Install Vagrant
Install SmartOS guest detection
vagrant plugin install vagrant-smartos-guest