I have my CakePHP application on my local machine that is rsynced to a vagrant box I've created. My Vagrant configuration is below:
# -*- mode: ruby -*-
# vi: set ft=ruby :
$set_environment_variables = <<SCRIPT
tee "/etc/profile.d/vars.sh" > "/dev/null" <<EOF
# Domain Name (excluding protocol)
export DOMAIN="cake.local"
# Unprivileged User
export UNPRIV_USER="web"
export UNPRIV_USER_PUB_KEY="removed"
# MySQL
export MYSQL_USER="wizard"
export MYSQL_PASSWORD="developer"
export MYSQL_HOST="localhost"
export MYSQL_DATABASE="cake_cms"
export MYSQL_ROOT_PASSWORD="developer"
EOF
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-20.04"
config.vm.network "private_network", ip: "192.168.33.15"
config.vm.synced_folder "app/", "/var/www/html", type: "rsync", owner: "web", group: "www-data", rsync__auto: true, rsync__exclude: ['app/vendor/*']
config.vm.provision "shell", inline: $set_environment_variables, run: "always"
config.vm.provision "shell", path: "provision.sh"
config.vm.provider "virtualbox" do |vb|
vb.memory = "512"
end
end
When I attempt to run php bin/cake.php bake model Users from my local machine I get the following error:
2021-04-13 21:51:15 Error: [Cake\Database\Exception\MissingExtensionException] Database driver Cake\Database\Driver\Mysql cannot be used due to a missing PHP extension or unmet dependency in C:\Users\JR2\Projects\cake-php-boilerplate\app\vendor\cakephp\cakephp\src\Database\Connection.php on line 202
This is because it's trying to connect to the MySQL database locally, which doesn't exist.
How am I able to have my local bin/cake.php connect to the database on the vagrant box?
Related
Heartbeat configuration file is below
# Directory + glob pattern to search for configuration files
path: ${path.config}/monitors.d/*.yml
# If enabled, heartbeat will periodically check the config.monitors path for changes
reload.enabled: true
# How often to check for changes
reload.period: 10s
heartbeat.monitors:
- type: http
id: my_app
name: "Check my_app liveness endpoint"
labels.application.name: my_app
schedule: '#every 1m'
service.name: 'my_app' # must be same as in apm
hosts: ["https://${host}/path/to/destination1", "https://${host}/path/to/destination2"]
check.request.method: HEAD
check.response.status: [200]
fields_under_root: true
fields:
service.environment: "${my_env}"
labels.application.name: my_app
####Enabling logging to heartbeat###
logging.level: debug
logging.to_files: true
logging.files.path: /usr/share/heartbeat/logs
logging.files.name: heartbeat-log
logging.files.keepfiles: 30
logging.files.permissions: 0640
output.kafka:
hosts: ["${KAFKA_URL}"]
ssl.verification_mode: "none"
topic: "heartbeat"
partition.round_robin:
reachable_only: true
client_id: ${MY_APPLICATION}-heartbeat-${MY_ENVIRONMENT}
required_acks: 1
monitoring:
enabled: false
this configuration is deployed as a Configmap inside the heartbeat pod.
But after the deployment, we are getting this error in Kibana Uptime Monitor :
Also tried hardcoded the variables which are there inside the yaml posted. The result is the same.
Can anybody help me?
I have been trying to set up zeppelin with authentication with Shiro JDBC realm. After all my attempts, I have not been able to get it working. The basic authentication works but with JDBC realm it fails.
The zeppelin server was created following the doc: http://zeppelin.apache.org/docs/0.9.0/quickstart/kubernetes.html
The POD is working.
I enabled the Shiro by extending the docker image. My Dockerfile:
ARG ZEPPELIN_IMAGE=apache/zeppelin:0.9.0
FROM ${ZEPPELIN_IMAGE}
#https://hub.docker.com/r/apache/zeppelin/dockerfile
WORKDIR ${Z_HOME}
ADD /zeppelin/shiro.ini ${Z_HOME}/conf/
ADD https://repo1.maven.org/maven2/mysql/mysql-connector-java/6.0.4/mysql-connector-java-6.0.4.jar ${Z_HOME}/lib/
ENV CLASSPATH=${Z_HOME}/lib/mysql-connector-java-6.0.4.jar:${CLASSPATH}
ENTRYPOINT [ "/usr/bin/tini", "--" ]
WORKDIR ${Z_HOME}
CMD ["bin/zeppelin.sh"]
My shiro.ini taken from https://gist.github.com/adamjshook/6c42b03fdb09b60cd519174d0aec1af5
[main]
ds = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
ds.serverName = localhost
ds.databaseName = zeppelin
ds.user = zeppelin
ds.password = zeppelin
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealmCredentialsMatcher = org.apache.shiro.authc.credential.Sha256CredentialsMatcher
jdbcRealm.credentialsMatcher = $jdbcRealmCredentialsMatcher
ps = org.apache.shiro.authc.credential.DefaultPasswordService
pm = org.apache.shiro.authc.credential.PasswordMatcher
pm.passwordService = $ps
jdbcRealm.dataSource = $ds
jdbcRealm.credentialsMatcher = $pm
shiro.loginUrl = /api/login
[urls]/** = authc
Now, when I deploy the zeppelin server, I get:
rg.apache.shiro.config.ConfigurationException: Unable to instantiate class [com.mysql.jdbc.jdbc2.optional.MysqlDataSource] for object named 'ds'. Please ensure you've specified the fully qualified class name correctly.
at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:327)
at org.apache.shiro.config.ReflectionBuilder$InstantiationStatement.doExecute(ReflectionBuilder.java:961)
at org.apache.shiro.config.ReflectionBuilder$Statement.execute(ReflectionBuilder.java:921)
at org.apache.shiro.config.ReflectionBuilder$BeanConfigurationProcessor.execute(ReflectionBuilder.java:799)
at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:278)
at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:181)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:139)
at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:107)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:98)
at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:47)
at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:150)
at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class named [com.mysql.jdbc.jdbc2.optional.MysqlDataSource] from the thread context, current, or system/application ClassLoaders. All heuristics have been exhausted. Class could not be found.
at org.apache.shiro.util.ClassUtils.forName(ClassUtils.java:152)
at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:168)
at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:320)
... 40 more
Not sure why it is failing even I have defined the jar file on classpath.
Issue with jar was not having the right permissions. Got it fixed with below Dockerfile
ARG ZEPPELIN_IMAGE=apache/zeppelin:0.9.0
FROM ${ZEPPELIN_IMAGE}
#https://hub.docker.com/r/apache/zeppelin/dockerfile
WORKDIR ${Z_HOME}
USER root
ADD /zeppelin/shiro.ini ${Z_HOME}/conf/
ADD https://repo1.maven.org/maven2/mysql/mysql-connector-java/6.0.4/mysql-connector-java-6.0.4.jar ${Z_HOME}/lib/
ENV CLASSPATH=${Z_HOME}/lib/mysql-connector-java-6.0.4.jar:${CLASSPATH}
RUN chmod 777 ${Z_HOME}/lib/mysql-connector-java-6.0.4.jar
USER 1000
ENTRYPOINT [ "/usr/bin/tini", "--" ]
WORKDIR ${Z_HOME}
CMD ["bin/zeppelin.sh"]
Am trying to install jenkins-x version 2.0.785 via ansible 2.9.9.
How do I handle the prompts like "Please enter the name you wish to use with git:" that I get while installing JX? There are multiple prompts to be handled that I will get when I execute the JX install command.
I get the above mentioned prompt even though "--git-username=automation" is already passed in the JX install command. I tried with both expect and shell module in ansible.
Kindly, suggest me a solution where I can handle these prompts via ansible.
Tried:-
- name: Handling multiple prompts
expect:
command: jx install --git-provider-kind bitbucketserver --git-provider-url http://rtx-swtl-git.fnc.net.local --git-username automation --default-environment-prefix TestProject --git-api-token MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW --on-premise --external-ip {{ hostvars[groups["kubemaster"][0]]["ip"] }} --verbose --static-jenkins=true --provider=openshift
responses:
Question:
- Please enter the name you wish to use with git: automation
timeout: 60
- name: Handling multiple prompts
expect:
command: jx install --git-provider-kind bitbucketserver --git-provider-url http://rtx-swtl-git.fnc.net.local --git-username automation --default-environment-prefix TestProject --git-api-token MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW --on-premise --external-ip {{ hostvars[groups["kubemaster"][0]]["ip"] }} --verbose --static-jenkins=true --provider=openshift
responses:
Please enter the name you wish to use with git: "automation"
- name: Handling multiple prompts
become: yes
shell: |
automation '' | jx install --git-provider-kind bitbucketserver --git-provider-url http://rtx-swtl-git.fnc.net.local --git-username automation --default-environment-prefix Testproject --git-api-token MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW --on-premise --external-ip {{ hostvars[groups["kubemaster"][0]]["ip"] }} --verbose --static-jenkins true --provider openshift
These doesn't give any errors in stderr section of ansible logs, the only thing is I receive the below attached logs in RED and it doesn't proceed further with the installation steps.
Output:-
fatal: [master]: FAILED! => {
"changed": true,
"cmd": "jx install --git-provider-kind bitbucketserver --git-provider-url http://rtx-swtl-git.fnc.net.local --git-username automation --default-environment-prefix TestProject --git-api-token MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW --on-premise --external-ip 167.254.204.90 --verbose --static-jenkins=true --provider=openshift --domain=jenkinsx.io",
"delta": "0:03:00.190343",
"end": "2020-06-17 06:44:03.620694",
"invocation": {
"module_args": {
"chdir": null,
"command": "jx install --git-provider-kind bitbucketserver --git-provider-url http://rtx-swtl-git.fnc.net.local --git-username automation --default-environment-prefix TestProject --git-api-token MzI1ODg1NjA1NTk4OqjiP9N3lr4iHt9L5rofdaWMqsgW --on-premise --external-ip 167.254.204.90 --verbose --static-jenkins=true --provider=openshift --domain=jenkinsx.io",
"creates": null,
"echo": false,
"removes": null,
"responses": {
"Question": [
{
"Please enter the name you wish to use with git": "automation"
},
{
"Please enter the email address you wish to use with git": "automation#fujitsu.com"
},
{
"\\? Do you wish to use automation as the local Git user for http://rtx-swtl-git.fnc.net.local server": "y"
},
{
"\\? Do you wish to use http://rtx-swtl-git.fnc.net.local as the pipelines Git server": "y"
}
]
},
"timeout": 180
}
},
"msg": "command exceeded timeout",
"rc": null,
"start": "2020-06-17 06:41:03.430351",
"stdout": "\u001b[1m\u001b[32m?\u001b[0m\u001b[0m \u001b[1mConfigured Jenkins installation type\u001b[0m: \u001b[36mStatic Jenkins Server and Jenkinsfiles\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: checking installation flags\r\n\u001b[36mDEBUG\u001b[0m: flags after checking - &{ConfigFile: InstallOnly:false Domain: ExposeControllerURLTemplate: ExposeControllerPathMode: AzureRegistrySubscription: DockerRegistry:docker-registry.default.svc:5000 DockerRegistryOrg: Provider:openshift VersionsRepository:https://github.com/jenkins-x/jenkins-x-versions.git VersionsGitRef: Version: LocalHelmRepoName:releases Namespace:jx CloudEnvRepository:https://github.com/jenkins-x/cloud-environments NoDefaultEnvironments:false RemoteEnvironments:false DefaultEnvironmentPrefix:TestProject LocalCloudEnvironment:false EnvironmentGitOwner: Timeout:6000 HelmTLS:false RegisterLocalHelmRepo:false CleanupTempFiles:true Prow:false DisableSetKubeContext:false Dir: Vault:false RecreateVaultBucket:true Tekton:false KnativeBuild:false BuildPackName: Kaniko:false GitOpsMode:false NoGitOpsEnvApply:false NoGitOpsEnvRepo:false NoGitOpsEnvSetup:false NoGitOpsVault:false NextGeneration:false StaticJenkins:true LongTermStorage:false LongTermStorageBucketName: CloudBeesDomain: CloudBeesAuth:}\r\n\u001b[36mDEBUG\u001b[0m: Setting the dev namespace to: \u001b[32mjx\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: Using helmBinary \u001b[32mhelm\u001b[0m with feature flag: \u001b[32mnone\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: \u001b[32mhelm\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/helm\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: \u001b[32mkubectl\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/kubectl\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: \u001b[32mhelm\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/helm\u001b[0m\r\nContext \"jx/master-167-254-204-90-nip-io:8443/waruser\" modified.\r\n\u001b[36mDEBUG\u001b[0m: \u001b[32mkubectl\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/kubectl\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: \u001b[32mhelm\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/helm\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: Storing the kubernetes provider openshift in the TeamSettings\r\n\u001b[36mDEBUG\u001b[0m: Enabling helm template mode in the TeamSettings\r\nGit configured for user: \u001b[32mautomation\u001b[0m and email \u001b[32mautomation#fujitsu.com\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: Using \u001b[32mhelm2\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: Skipping \u001b[32mtiller\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: Using helmBinary \u001b[32mhelm\u001b[0m with feature flag: \u001b[32mtemplate-mode\u001b[0m\r\n\u001b[36mDEBUG\u001b[0m: Initialising Helm '\u001b[32minit --client-only\u001b[0m'\r\nhelm installed and configured\r\nNot installing ingress as using OpenShift which uses Route and its own mechanism of ingress\r\nEnabling anyuid for the Jenkins service account in namespace jx\r\nscc \"anyuid\" added to: [\"system:serviceaccount:jx:jenkins\"]\r\nscc \"hostaccess\" added to: [\"system:serviceaccount:jx:jenkins\"]\r\nscc \"privileged\" added to: [\"system:serviceaccount:jx:jenkins\"]\r\nscc \"anyuid\" added to: [\"system:serviceaccount:jx:default\"]\r\n\u001b[36mDEBUG\u001b[0m: Long Term Storage not supported by provider 'openshift', disabling this option\r\nSet up a Git username and API token to be able to perform CI/CD\r\n\u001b[36mDEBUG\u001b[0m: merging pipeline secrets with local secrets\r\n\u001b[0G\u001b[2K\u001b[1;92m? \u001b[0m\u001b[1;99mDo you wish to use automation as the local Git user for http://rtx-swtl-git.fnc.net.local server: \u001b[0m\u001b[37m(Y/n) \u001b[0m\u001b[?25l\u001b7\u001b[999;999f\u001b[6n",
"stdout_lines": [
"\u001b[1m\u001b[32m?\u001b[0m\u001b[0m \u001b[1mConfigured Jenkins installation type\u001b[0m: \u001b[36mStatic Jenkins Server and Jenkinsfiles\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: checking installation flags",
"\u001b[36mDEBUG\u001b[0m: flags after checking - &{ConfigFile: InstallOnly:false Domain: ExposeControllerURLTemplate: ExposeControllerPathMode: AzureRegistrySubscription: DockerRegistry:docker-registry.default.svc:5000 DockerRegistryOrg: Provider:openshift VersionsRepository:https://github.com/jenkins-x/jenkins-x-versions.git VersionsGitRef: Version: LocalHelmRepoName:releases Namespace:jx CloudEnvRepository:https://github.com/jenkins-x/cloud-environments NoDefaultEnvironments:false RemoteEnvironments:false DefaultEnvironmentPrefix:TestProject LocalCloudEnvironment:false EnvironmentGitOwner: Timeout:6000 HelmTLS:false RegisterLocalHelmRepo:false CleanupTempFiles:true Prow:false DisableSetKubeContext:false Dir: Vault:false RecreateVaultBucket:true Tekton:false KnativeBuild:false BuildPackName: Kaniko:false GitOpsMode:false NoGitOpsEnvApply:false NoGitOpsEnvRepo:false NoGitOpsEnvSetup:false NoGitOpsVault:false NextGeneration:false StaticJenkins:true LongTermStorage:false LongTermStorageBucketName: CloudBeesDomain: CloudBeesAuth:}",
"\u001b[36mDEBUG\u001b[0m: Setting the dev namespace to: \u001b[32mjx\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: Using helmBinary \u001b[32mhelm\u001b[0m with feature flag: \u001b[32mnone\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: \u001b[32mhelm\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/helm\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: \u001b[32mkubectl\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/kubectl\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: \u001b[32mhelm\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/helm\u001b[0m",
"Context \"jx/master-167-254-204-90-nip-io:8443/waruser\" modified.",
"\u001b[36mDEBUG\u001b[0m: \u001b[32mkubectl\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/kubectl\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: \u001b[32mhelm\u001b[0m is already available on your PATH at \u001b[32m/usr/bin/helm\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: Storing the kubernetes provider openshift in the TeamSettings",
"\u001b[36mDEBUG\u001b[0m: Enabling helm template mode in the TeamSettings",
"Git configured for user: \u001b[32mautomation\u001b[0m and email \u001b[32mautomation#fujitsu.com\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: Using \u001b[32mhelm2\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: Skipping \u001b[32mtiller\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: Using helmBinary \u001b[32mhelm\u001b[0m with feature flag: \u001b[32mtemplate-mode\u001b[0m",
"\u001b[36mDEBUG\u001b[0m: Initialising Helm '\u001b[32minit --client-only\u001b[0m'",
"helm installed and configured",
"Not installing ingress as using OpenShift which uses Route and its own mechanism of ingress",
"Enabling anyuid for the Jenkins service account in namespace jx",
"scc \"anyuid\" added to: [\"system:serviceaccount:jx:jenkins\"]",
"scc \"hostaccess\" added to: [\"system:serviceaccount:jx:jenkins\"]",
"scc \"privileged\" added to: [\"system:serviceaccount:jx:jenkins\"]",
"scc \"anyuid\" added to: [\"system:serviceaccount:jx:default\"]",
"\u001b[36mDEBUG\u001b[0m: Long Term Storage not supported by provider 'openshift', disabling this option",
"Set up a Git username and API token to be able to perform CI/CD",
"\u001b[36mDEBUG\u001b[0m: merging pipeline secrets with local secrets",
"\u001b[0G\u001b[2K\u001b[1;92m? \u001b[0m\u001b[1;99mDo you wish to use automation as the local Git user for http://rtx-swtl-git.fnc.net.local server: \u001b[0m\u001b[37m(Y/n) \u001b[0m\u001b[?25l\u001b7\u001b[999;999f\u001b[6n"
]
}
PLAY RECAP *************************************************************************************************************************************************************
master : ok=3 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Helm, JX, Git, Ansible versions:-
I was trying to create a drupalvm instance running drupal 7 by changing the "core" and "version" as suggested in the readme file, and then running vagrant up, but the issue is that after doing so it keeps on installing drupal8 (default).
Following are the drupal.make.yml file and the config.yml file that I edited before building the machine.
drupal.make.yml
---
api: 2
# Basic Drush Make file for Drupal. Be sure to update the drupal_major_version
# variable inside config.yml if you change the major version in this file.
# Drupal core (major version, e.g. 6.x, 7.x, 8.x).
core: "7.x"
projects:
# Core.
drupal:
type: "core"
download:
# Drupal core branch (e.g. "6.x", "7.x", "8.0.x").
branch: "7.0.x"
working-copy: true
# Other modules.
devel: "1.x-dev"
config.yml
---
# `vagrant_box` can also be set to geerlingguy/centos6, geerlingguy/centos7,
# geerlingguy/ubuntu1204, parallels/ubuntu-14.04, etc.
vagrant_box: geerlingguy/ubuntu1404
vagrant_user: vagrant
vagrant_synced_folder_default_type: nfs
# If you need to run multiple instances of Drupal VM, set a unique hostname,
# machine name, and IP address for each instance.
vagrant_hostname: drupalvm.dev
vagrant_machine_name: drupalvm
vagrant_ip: 192.168.88.88
# Allow Drupal VM to be accessed via a public network interface on your host.
# Vagrant boxes are insecure by default, so be careful. You've been warned!
# See: https://docs.vagrantup.com/v2/networking/public_network.html
vagrant_public_ip: ""
# A list of synced folders, with the keys 'local_path', 'destination', and
# a 'type' of [nfs|rsync|smb] (leave empty for slow native shares). See
# http://docs.drupalvm.com/en/latest/extras/syncing-folders/ for more info.
vagrant_synced_folders:
# The first synced folder will be used for the default Drupal installation, if
# build_makefile: is 'true'.
- local_path: ~/Documents/projectohri/drupalvm
destination: /var/www/drupalvm
type: nfs
create: true
# Memory and CPU to use for this VM.
vagrant_memory: 1024
vagrant_cpus: 2
# The web server software to use. Can be either 'apache' or 'nginx'.
drupalvm_webserver: apache
# Set this to false if you are using a different site deployment strategy and
# would like to configure 'vagrant_synced_folders' and 'apache_vhosts' manually.
build_makefile: true
drush_makefile_path: /vagrant/drupal.make.yml
# Set this to false if you don't need to install drupal (using the drupal_*
# settings below), but instead copy down a database (e.g. using drush sql-sync).
install_site: true
# Settings for building a Drupal site from a makefile (if 'build_makefile:'
# is 'true').
drupal_major_version: 7
drupal_core_path: "/var/www/drupalvm/drupal"
drupal_domain: "drupalvm.dev"
drupal_site_name: "Drupal"
drupal_install_profile: standard
drupal_enable_modules: [ 'devel' ]
drupal_account_name: admin
drupal_account_pass: admin
drupal_mysql_user: drupal
drupal_mysql_password: drupal
drupal_mysql_database: drupal
# Additional arguments or options to pass to `drush site-install`.
drupal_site_install_extra_args: []
# Cron jobs are added to the root user's crontab. Keys include name (required),
# minute, hour, day, weekday, month, job (required), and state.
drupalvm_cron_jobs: []
# - {
# name: "Drupal Cron",
# minute: "*/30",
# job: "drush -r {{ drupal_core_path }} core-cron"
# }
# Drupal VM automatically creates a drush alias file in your ~/.drush folder if
# this variable is 'true'.
configure_local_drush_aliases: true
# Apache VirtualHosts. Add one for each site you are running inside the VM. For
# multisite deployments, you can point multiple servernames at one documentroot.
# View the geerlingguy.apache Ansible Role README for more options.
apache_vhosts:
- servername: "{{ drupal_domain }}"
documentroot: "{{ drupal_core_path }}"
extra_parameters: |
ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000{{ drupal_core_path }}"
- servername: "adminer.drupalvm.dev"
documentroot: "/opt/adminer"
- servername: "xhprof.drupalvm.dev"
documentroot: "/usr/share/php/xhprof_html"
- servername: "pimpmylog.drupalvm.dev"
documentroot: "/usr/share/php/pimpmylog"
apache_remove_default_vhost: true
apache_mods_enabled:
- expires.load
- ssl.load
- rewrite.load
# Nginx hosts. Each site will get a server entry using the configuration defined
# here. Set the 'is_php' property for document roots that contain PHP apps like
# Drupal.
nginx_hosts:
- server_name: "{{ drupal_domain }}"
root: "{{ drupal_core_path }}"
is_php: true
- server_name: "adminer.drupalvm.dev"
root: "/opt/adminer"
is_php: true
- server_name: "xhprof.drupalvm.dev"
root: "/usr/share/php/xhprof_html"
is_php: true
- server_name: "pimpmylog.drupalvm.dev"
root: "/usr/share/php/pimpmylog"
is_php: true
nginx_remove_default_vhost: true
# MySQL Databases and users. If build_makefile: is true, first database will
# be used for the makefile-built site.
mysql_databases:
- name: "{{ drupal_mysql_database }}"
encoding: utf8
collation: utf8_general_ci
mysql_users:
- name: "{{ drupal_mysql_user }}"
host: "%"
password: "{{ drupal_mysql_password }}"
priv: "{{ drupal_mysql_database }}.*:ALL"
# Comment out any extra utilities you don't want to install. If you don't want
# to install *any* extras, make set this value to an empty set, e.g. `[]`.
installed_extras:
- adminer
- drupalconsole
- mailhog
- memcached
# - nodejs
- pimpmylog
# - redis
# - ruby
# - selenium
# - solr
- varnish
- xdebug
- xhprof
# Add any extra apt or yum packages you would like installed.
extra_packages:
- unzip
# `nodejs` must be in installed_extras for this to work.
nodejs_version: "0.12"
nodejs_npm_global_packages: []
# `ruby` must be in installed_extras for this to work.
ruby_install_gems_user: "{{ vagrant_user }}"
ruby_install_gems: []
# You can configure almost anything else on the server in the rest of this file.
extra_security_enabled: false
drush_version: master
drush_keep_updated: true
drush_composer_cli_options: "--prefer-dist --no-interaction"
firewall_allowed_tcp_ports:
- "22"
- "25"
- "80"
- "81"
- "443"
- "4444"
- "8025"
- "8080"
- "8443"
- "8983"
firewall_log_dropped_packets: false
# PHP Configuration. Currently-supported versions: 5.5, 5.6, 7.0.
php_version: "5.6"
php_memory_limit: "192M"
php_display_errors: "On"
php_display_startup_errors: "On"
php_enable_php_fpm: true
php_realpath_cache_size: "1024K"
php_sendmail_path: "/usr/sbin/ssmtp -t"
php_opcache_enabled_in_ini: true
php_opcache_memory_consumption: "192"
php_opcache_max_accelerated_files: 4096
php_max_input_vars: "4000"
composer_path: /usr/bin/composer
composer_home_path: '/home/vagrant/.composer'
# composer_global_packages:
# - { name: phpunit/phpunit, release: '#stable' }
# Run specified scripts after VM is provisioned. Path is relative to the
# `provisioning/playbook.yml` file.
post_provision_scripts: []
# - "../examples/scripts/configure-solr.sh"
# MySQL Configuration.
mysql_root_password: root
mysql_slow_query_log_enabled: true
mysql_slow_query_time: 2
mysql_wait_timeout: 300
adminer_install_filename: index.php
# Varnish Configuration.
varnish_listen_port: "81"
varnish_default_vcl_template_path: templates/drupalvm.vcl.j2
varnish_default_backend_host: "127.0.0.1"
varnish_default_backend_port: "80"
# Pimp my Log settings.
pimpmylog_install_dir: /usr/share/php/pimpmylog
pimpmylog_grant_all_privs: true
# XDebug configuration. XDebug is disabled by default for better performance.
php_xdebug_default_enable: 0
php_xdebug_coverage_enable: 0
php_xdebug_cli_enable: 1
php_xdebug_remote_enable: 1
php_xdebug_remote_connect_back: 1
# Use PHPSTORM for PHPStorm, sublime.xdebug for Sublime Text.
php_xdebug_idekey: PHPSTORM
php_xdebug_max_nesting_level: 256
# Solr Configuration (if enabled above).
solr_version: "4.10.4"
solr_xms: "64M"
solr_xmx: "128M"
# Selenium configuration.
selenium_version: 2.46.0
# Other configuration.
known_hosts_path: ~/.ssh/known_hosts
7.0.x is not a valid drupal version. Re-read the docs above that link in the drupal.make.yml and change it to "7.x"
Also, be sure to run vagrant destroy to remove all traces of the old instance. It could be that it isn't downloading a new copy, just using the D8 that it downloaded already.
I am having issues with Active Directory authentication via LDAP on Gitlab omnibus. I have tested the credentials and bind dn using ldapsearch and received a response with no issues, but for some reason I am not seeing any attempts at connecting when I login as an AD user on the gitlab frontend. I receive the error "Could not authorize you from Ldapmain because "Invalid credentials"." no matter if I'm using valid credentials or not.
I also receive the following from sudo gitlab-rake gitlab:check:
** Invoke gitlab:ldap:check (first_time)
** Invoke environment
** Execute gitlab:ldap:check
Checking LDAP ...
LDAP users with access to your GitLab server (only showing the first 100 results)
Server: ldapmain
Checking LDAP ... Finished
Please let me know if my explanation is not clear, or if you think that additional information would be helpful. I tried searching around and am not finding my exact issue.
My configuration is as follows:
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS # remember to close this block with 'EOS' below
main: # 'main' is the GitLab 'provider ID' of this LDAP server
## label
#
# A human-friendly name for your LDAP server. It is OK to change the label later,
# for instance if you find out it is too large to fit on the web page.
#
# Example: 'Paris' or 'Acme, Ltd.'
label: 'LDAP'
host: 'myadserver.my.domain.net'
port: 389
uid: 'sAMAccountName'
method: 'plain' # "tls" or "ssl" or "plain"
bind_dn: 'CN=Gitlab,OU=Service Accounts,OU=Washington\, D.C.,OU=United States,OU=NA,DC=my,DC=domain,DC=net'
password: 'mypasswrd'
# This setting specifies if LDAP server is Active Directory LDAP server.
# For non AD servers it skips the AD specific queries.
# If your LDAP server is not AD, set this to false.
active_directory: true
# If allow_username_or_email_login is enabled, GitLab will ignore everything
# after the first '#' in the LDAP username submitted by the user on login.
#
# Example:
# - the user enters 'jane.doe#example.com' and 'p#ssw0rd' as LDAP credentials;
# - GitLab queries the LDAP server with 'jane.doe' and 'p#ssw0rd'.
#
# If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to
# disable this setting, because the userPrincipalName contains an '#'.
allow_username_or_email_login: true
# Base where we can search for users
#
# Ex. ou=People,dc=gitlab,dc=example
#
base: 'OU=Washington\, D.C.,OU=United States,OU=NA,DC=my,DC=domain,DC=net'
# Filter LDAP users
#
# Format: RFC 4515 http://tools.ietf.org/search/rfc4515
# Ex. (employeeType=developer)
#
# Note: GitLab does not support omniauth-ldap's custom filter syntax.
#
#user_filter: ''
EOS
This was, of course, a whitespace issue. See lines below:
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS # remember to close this block with 'EOS' below
main: # 'main' is the GitLab 'provider ID' of this LDAP server
## label
#
# A human-friendly name for your LDAP server. It is OK to change the label later,
# for instance if you find out it is too large to fit on the web page.
#
# Example: 'Paris' or 'Acme, Ltd.'
label: 'LDAP'