diff --git a/.gitattributes b/.gitattributes index b19d1c09014..71665f0d14f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -29,3 +29,7 @@ gradlew text eol=lf core/javaAction/proxy/gradlew text eol=lf tools/vagrant/hello text eol=lf sdk/docker/client/action text eol=lf + +# auth files with default api keys +ansible/files/auth.guest text eol=lf +ansible/files/auth.whisk.system text eol=lf diff --git a/.gitignore b/.gitignore index aab3af088bf..5ba08fc8cb7 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ results !/ansible/environments/docker-machine !/ansible/environments/local !/ansible/environments/mac +!/ansible/environments/vagrant # Eclipse bin/ diff --git a/ansible/environments/vagrant/group_vars/all b/ansible/environments/vagrant/group_vars/all new file mode 100755 index 00000000000..2015f0fb75f --- /dev/null +++ b/ansible/environments/vagrant/group_vars/all @@ -0,0 +1,42 @@ +whisk_version_name: local +openwhisk_tmp_dir: "{{ lookup('env', 'OPENWHISK_TMP_DIR')|default('/tmp', true) }}" +config_root_dir: "{{ openwhisk_tmp_dir }}/wskconf" +whisk_logs_dir: "{{ openwhisk_tmp_dir }}/wsklogs" +docker_registry: "" +docker_dns: "" +runtimes_bypass_pull_for_local_images: true +invoker_use_runc: "{{ ansible_distribution != 'MacOSX' }}" + +db_prefix: whisk_local_ + +# Auto lookup to find the db credentials +db_provider: "{{ lookup('ini', 'db_provider section=db_creds file={{ playbook_dir }}/db_local.ini') }}" +db_username: "{{ lookup('ini', 'db_username section=db_creds file={{ playbook_dir }}/db_local.ini') }}" +db_password: "{{ lookup('ini', 'db_password section=db_creds file={{ playbook_dir }}/db_local.ini') }}" +db_protocol: "{{ lookup('ini', 'db_protocol section=db_creds file={{ playbook_dir }}/db_local.ini') }}" +db_host: "{{ lookup('ini', 'db_host section=db_creds file={{ playbook_dir }}/db_local.ini') }}" +db_port: "{{ lookup('ini', 'db_port section=db_creds file={{ playbook_dir }}/db_local.ini') }}" + +# API GW connection configuration +apigw_auth_user: "" +apigw_auth_pwd: "" +apigw_host_v2: "http://{{ groups['apigateway']|first }}:{{apigateway.port.api}}/v2" + +invoker_allow_multiple_instances: true + +# Set kafka configuration +kafka_heap: '512m' +kafka_topics_completed_retentionBytes: 104857600 +kafka_topics_completed_retentionMS: 300000 +kafka_topics_health_retentionBytes: 104857600 +kafka_topics_health_retentionMS: 300000 +kafka_topics_invoker_retentionBytes: 104857600 +kafka_topics_invoker_retentionMS: 300000 + +env_hosts_dir: "{{ playbook_dir }}/environments/local" + +controller_protocol: "http" + +cli_installation_mode: "local" + +invoker_use_runc: false diff --git a/ansible/environments/vagrant/hosts b/ansible/environments/vagrant/hosts new file mode 100644 index 00000000000..b6308123e76 --- /dev/null +++ b/ansible/environments/vagrant/hosts @@ -0,0 +1,29 @@ +; the first parameter in a host is the inventory_hostname + +; used for local actions only +ansible ansible_connection=local + +[edge] +172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local + +[controllers] +controller0 ansible_host=172.17.0.1 ansible_connection=local +; +[kafkas] +kafka0 ansible_host=172.17.0.1 ansible_connection=local + +[zookeepers:children] +kafkas + +[invokers] +invoker0 ansible_host=172.17.0.1 ansible_connection=local + +; db group is only used if db_provider is CouchDB +[db] +172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local + +[redis] +172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local + +[apigateway] +172.17.0.1 ansible_host=172.17.0.1 ansible_connection=local diff --git a/ansible/files/auth.guest b/ansible/files/auth.guest index 315627438d7..39eda06b74b 100644 --- a/ansible/files/auth.guest +++ b/ansible/files/auth.guest @@ -1 +1 @@ -23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP +23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP \ No newline at end of file diff --git a/ansible/files/auth.whisk.system b/ansible/files/auth.whisk.system index e44545b61ff..dbcd2792ced 100644 --- a/ansible/files/auth.whisk.system +++ b/ansible/files/auth.whisk.system @@ -1 +1 @@ -789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP +789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP \ No newline at end of file diff --git a/tools/ubuntu-setup/docker-xenial.sh b/tools/ubuntu-setup/docker-xenial.sh index 812a0c2ff11..fa3a3148d8c 100644 --- a/tools/ubuntu-setup/docker-xenial.sh +++ b/tools/ubuntu-setup/docker-xenial.sh @@ -51,10 +51,6 @@ sudo apt-get install -y docker-ce # Replace with lines above to lock in version sudo -E bash -c 'echo '\''DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --storage-driver=aufs"'\'' >> /etc/default/docker' sudo gpasswd -a "$(whoami)" docker -# Set DOCKER_HOST as an environment variable -sudo -E bash -c 'echo '\''export DOCKER_HOST="tcp://0.0.0.0:4243"'\'' >> /etc/bash.bashrc' -source /etc/bash.bashrc - sudo service docker restart # do not run this command without a vagrant reload during provisioning diff --git a/tools/ubuntu-setup/docker.sh b/tools/ubuntu-setup/docker.sh index de3a76c05d9..caa74f64499 100755 --- a/tools/ubuntu-setup/docker.sh +++ b/tools/ubuntu-setup/docker.sh @@ -39,9 +39,6 @@ sudo apt-mark hold docker-engine sudo -E bash -c 'echo '\''DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --storage-driver=aufs"'\'' >> /etc/default/docker' sudo gpasswd -a "$(whoami)" docker -# Set DOCKER_HOST as an environment variable -sudo -E bash -c 'echo '\''export DOCKER_HOST="tcp://0.0.0.0:4243"'\'' >> /etc/bash.bashrc' -source /etc/bash.bashrc sudo service docker restart diff --git a/tools/vagrant/README.md b/tools/vagrant/README.md index 3e25b19085c..18a216bb211 100644 --- a/tools/vagrant/README.md +++ b/tools/vagrant/README.md @@ -1,16 +1,16 @@