diff --git a/modules/apim/templates/carbon-home/bin/api-manager.sh.erb b/modules/apim/templates/carbon-home/bin/api-manager.sh.erb index b4e6cae6..30ba1f58 100644 --- a/modules/apim/templates/carbon-home/bin/api-manager.sh.erb +++ b/modules/apim/templates/carbon-home/bin/api-manager.sh.erb @@ -257,16 +257,28 @@ fi for f in "$CARBON_HOME"/bin/*.jar do if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$f" + else + CARBON_CLASSPATH="$f" + fi fi done for t in "$CARBON_HOME"/lib/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done for t in "$CARBON_HOME"/lib/endorsed/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done diff --git a/modules/apim/templates/carbon-home/repository/conf/deployment.toml.erb b/modules/apim/templates/carbon-home/repository/conf/deployment.toml.erb index 94fbf7c2..189170bf 100644 --- a/modules/apim/templates/carbon-home/repository/conf/deployment.toml.erb +++ b/modules/apim/templates/carbon-home/repository/conf/deployment.toml.erb @@ -55,6 +55,9 @@ key_password = "<%= @key_store_key_password %>" #alias = "wso2carbon" #key_password = "wso2carbon" +[apim] +gateway_type = "Regular,APK,AWS" + <% @gateway_environments.each do |environment| %> [[apim.gateway.environment]] name = "<%= environment['name'] %>" @@ -117,7 +120,7 @@ token = <%= @ai_token %> endpoint = <%= @ai_endpoint %> [apim.key_manager] -enable_apikey_subscription_validation = true +enable_lightweight_apikey_generation = true service_url = "<%= @key_manager_server_url %>" #username = "$ref{super_admin.username}" #password = "$ref{super_admin.password}" @@ -143,6 +146,7 @@ service_url = "<%= @key_manager_server_url %>" #signing_algorithm = "SHA256withRSA" #enable_user_claims = true #claims_extractor_impl = "org.wso2.carbon.apimgt.impl.token.ExtendedDefaultClaimsRetriever" +#use_sha256_hash = false [apim.oauth_config] #enable_outbound_auth_header = false @@ -166,6 +170,9 @@ url = "<%= @api_devportal_url %>" #enable_cross_tenant_subscriptions = true #default_reserved_username = "apim_reserved_user" +#[apim.publisher] +#enable_portal_configuration_only_mode = false + [apim.cors] allow_origins = "*" allow_methods = ["GET","PUT","POST","DELETE","PATCH","OPTIONS"] @@ -236,7 +243,7 @@ allow_credentials = false #enable_authentication = true #[apim.token.revocation] -#notifier_impl = "org.wso2.carbon.apimgt.keymgt.events.TokenRevocationNotifierImpl" +#notifier_impl = "org.wso2.carbon.apimgt.notification.TokenRevocationNotifierImpl" #enable_realtime_notifier = true #realtime_notifier.ttl = 5000 #enable_persistent_notifier = true diff --git a/modules/apim_common/manifests/params.pp b/modules/apim_common/manifests/params.pp index 14fa9ae0..c9683af6 100644 --- a/modules/apim_common/manifests/params.pp +++ b/modules/apim_common/manifests/params.pp @@ -17,7 +17,7 @@ class apim_common::params { $packages = ["unzip"] - $version = "4.3.0" + $version = "4.5.0" # Set the location the product packages should reside in (eg: "local" in the /files directory, "remote" in a remote location) $pack_location = "local" diff --git a/modules/apim_control_plane/manifests/init.pp b/modules/apim_control_plane/manifests/init.pp index e2826bcd..f7e41cab 100644 --- a/modules/apim_control_plane/manifests/init.pp +++ b/modules/apim_control_plane/manifests/init.pp @@ -20,11 +20,6 @@ include apim_common - # Optimize for profile - exec { "optimize-profile": - command => "/bin/sh ${carbon_home}/bin/profileSetup.sh -Dprofile=control-plane", - } - # Copy configuration changes to the installed directory $template_list.each |String $template| { file { "${carbon_home}/${template}": @@ -61,7 +56,7 @@ } } - # Copy api-manager.sh to installed directory + # Copy api-cp.sh to installed directory file { "${carbon_home}/${start_script_template}": ensure => file, owner => $user, diff --git a/modules/apim_control_plane/manifests/params.pp b/modules/apim_control_plane/manifests/params.pp index 93dd28eb..7280f218 100644 --- a/modules/apim_control_plane/manifests/params.pp +++ b/modules/apim_control_plane/manifests/params.pp @@ -18,7 +18,7 @@ # This class includes all the necessary parameters. class apim_control_plane::params inherits apim_common::params { - $start_script_template = 'bin/api-manager.sh' + $start_script_template = 'bin/api-cp.sh' $jvmxms = '256m' $jvmxmx = '1024m' diff --git a/modules/apim_control_plane/templates/carbon-home/bin/api-manager.sh.erb b/modules/apim_control_plane/templates/carbon-home/bin/api-cp.sh.erb similarity index 95% rename from modules/apim_control_plane/templates/carbon-home/bin/api-manager.sh.erb rename to modules/apim_control_plane/templates/carbon-home/bin/api-cp.sh.erb index b4e6cae6..8c04ffa6 100644 --- a/modules/apim_control_plane/templates/carbon-home/bin/api-manager.sh.erb +++ b/modules/apim_control_plane/templates/carbon-home/bin/api-cp.sh.erb @@ -204,7 +204,7 @@ elif [ "$CMD" = "start" ]; then fi export CARBON_HOME="$CARBON_HOME" # using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & + nohup sh "$CARBON_HOME"/bin/api-cp.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "stop" ]; then export CARBON_HOME="$CARBON_HOME" @@ -223,7 +223,7 @@ elif [ "$CMD" = "restart" ]; then done # using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & + nohup sh "$CARBON_HOME"/bin/api-cp.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "test" ]; then JAVACMD="exec "$JAVACMD"" @@ -257,16 +257,28 @@ fi for f in "$CARBON_HOME"/bin/*.jar do if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$f" + else + CARBON_CLASSPATH="$f" + fi fi done for t in "$CARBON_HOME"/lib/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done for t in "$CARBON_HOME"/lib/endorsed/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done diff --git a/modules/apim_gateway/manifests/init.pp b/modules/apim_gateway/manifests/init.pp index b7c7c9fd..05ac71c5 100644 --- a/modules/apim_gateway/manifests/init.pp +++ b/modules/apim_gateway/manifests/init.pp @@ -20,11 +20,6 @@ include apim_common - # Optimize for profile - exec { "optimize-profile": - command => "/bin/sh ${carbon_home}/bin/profileSetup.sh -Dprofile=gateway-worker", - } - # Copy configuration changes to the installed directory $template_list.each |String $template| { file { "${carbon_home}/${template}": @@ -61,7 +56,7 @@ } } - # Copy api-manager.sh to installed directory + # Copy gateway.sh to installed directory file { "${carbon_home}/${start_script_template}": ensure => file, owner => $user, diff --git a/modules/apim_gateway/manifests/params.pp b/modules/apim_gateway/manifests/params.pp index 2b0cc1bf..5910a871 100644 --- a/modules/apim_gateway/manifests/params.pp +++ b/modules/apim_gateway/manifests/params.pp @@ -18,7 +18,7 @@ # This class includes all the necessary parameters. class apim_gateway::params inherits apim_common::params { - $start_script_template = 'bin/api-manager.sh' + $start_script_template = 'bin/gateway.sh' $jvmxms = '256m' $jvmxmx = '1024m' diff --git a/modules/apim_gateway/templates/carbon-home/bin/api-manager.sh.erb b/modules/apim_gateway/templates/carbon-home/bin/gateway.sh.erb similarity index 91% rename from modules/apim_gateway/templates/carbon-home/bin/api-manager.sh.erb rename to modules/apim_gateway/templates/carbon-home/bin/gateway.sh.erb index b4e6cae6..5a48c1b7 100644 --- a/modules/apim_gateway/templates/carbon-home/bin/api-manager.sh.erb +++ b/modules/apim_gateway/templates/carbon-home/bin/gateway.sh.erb @@ -157,28 +157,6 @@ do CMD="restart" elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then CMD="test" - elif [ "$c" = "--optimize" ] || [ "$c" = "-optimize" ] || [ "$c" = "optimize" ]; then - for option in $*; do - if [ "$option" = "--skipConfigOptimization" ] || [ "$option" = "-skipConfigOptimization" ] || - [ "$option" = "skipConfigOptimization" ]; then - passedSkipConfigOptimizationOption=true - echo "Passed skipConfigOptimization Option: $passedSkipConfigOptimizationOption" - fi - done - - for profile in $*; do - case "$profile" in - *Dprofile=*) - cd $(dirname "$0") - if [ "$passedSkipConfigOptimizationOption" = true ]; then - sh profileSetup.sh $profile --skipConfigOptimization - else - sh profileSetup.sh $profile - fi - echo "Starting the server..." - ;; - esac - done else args="$args $c" fi @@ -204,7 +182,7 @@ elif [ "$CMD" = "start" ]; then fi export CARBON_HOME="$CARBON_HOME" # using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & + nohup sh "$CARBON_HOME"/bin/gateway.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "stop" ]; then export CARBON_HOME="$CARBON_HOME" @@ -223,7 +201,7 @@ elif [ "$CMD" = "restart" ]; then done # using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & + nohup sh "$CARBON_HOME"/bin/gateway.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "test" ]; then JAVACMD="exec "$JAVACMD"" @@ -257,16 +235,28 @@ fi for f in "$CARBON_HOME"/bin/*.jar do if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$f" + else + CARBON_CLASSPATH="$f" + fi fi done for t in "$CARBON_HOME"/lib/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done for t in "$CARBON_HOME"/lib/endorsed/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done diff --git a/modules/apim_tm/manifests/init.pp b/modules/apim_tm/manifests/init.pp index 654c4055..6fec4d21 100644 --- a/modules/apim_tm/manifests/init.pp +++ b/modules/apim_tm/manifests/init.pp @@ -20,11 +20,6 @@ include apim_common - # Optimize for profile - exec { "optimize-profile": - command => "/bin/sh ${carbon_home}/bin/profileSetup.sh -Dprofile=traffic-manager", - } - # Copy configuration changes to the installed directory $template_list.each |String $template| { file { "${carbon_home}/${template}": @@ -61,7 +56,7 @@ } } - # Copy api-manager.sh to installed directory + # Copy traffic-manager.sh to installed directory file { "${carbon_home}/${start_script_template}": ensure => file, owner => $user, diff --git a/modules/apim_tm/manifests/params.pp b/modules/apim_tm/manifests/params.pp index fb633d8f..c05f863e 100644 --- a/modules/apim_tm/manifests/params.pp +++ b/modules/apim_tm/manifests/params.pp @@ -18,7 +18,7 @@ # This class includes all the necessary parameters. class apim_tm::params inherits apim_common::params { - $start_script_template = 'bin/api-manager.sh' + $start_script_template = 'bin/traffic-manager.sh' $jvmxms = '256m' $jvmxmx = '1024m' diff --git a/modules/apim_tm/templates/carbon-home/bin/api-manager.sh.erb b/modules/apim_tm/templates/carbon-home/bin/traffic-manager.sh.erb similarity index 91% rename from modules/apim_tm/templates/carbon-home/bin/api-manager.sh.erb rename to modules/apim_tm/templates/carbon-home/bin/traffic-manager.sh.erb index b4e6cae6..0a08c7ae 100644 --- a/modules/apim_tm/templates/carbon-home/bin/api-manager.sh.erb +++ b/modules/apim_tm/templates/carbon-home/bin/traffic-manager.sh.erb @@ -157,28 +157,6 @@ do CMD="restart" elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then CMD="test" - elif [ "$c" = "--optimize" ] || [ "$c" = "-optimize" ] || [ "$c" = "optimize" ]; then - for option in $*; do - if [ "$option" = "--skipConfigOptimization" ] || [ "$option" = "-skipConfigOptimization" ] || - [ "$option" = "skipConfigOptimization" ]; then - passedSkipConfigOptimizationOption=true - echo "Passed skipConfigOptimization Option: $passedSkipConfigOptimizationOption" - fi - done - - for profile in $*; do - case "$profile" in - *Dprofile=*) - cd $(dirname "$0") - if [ "$passedSkipConfigOptimizationOption" = true ]; then - sh profileSetup.sh $profile --skipConfigOptimization - else - sh profileSetup.sh $profile - fi - echo "Starting the server..." - ;; - esac - done else args="$args $c" fi @@ -204,7 +182,7 @@ elif [ "$CMD" = "start" ]; then fi export CARBON_HOME="$CARBON_HOME" # using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & + nohup sh "$CARBON_HOME"/bin/traffic-manager.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "stop" ]; then export CARBON_HOME="$CARBON_HOME" @@ -223,7 +201,7 @@ elif [ "$CMD" = "restart" ]; then done # using nohup sh to avoid erros in solaris OS.TODO - nohup sh "$CARBON_HOME"/bin/api-manager.sh $args > /dev/null 2>&1 & + nohup sh "$CARBON_HOME"/bin/traffic-manager.sh $args > /dev/null 2>&1 & exit 0 elif [ "$CMD" = "test" ]; then JAVACMD="exec "$JAVACMD"" @@ -257,16 +235,28 @@ fi for f in "$CARBON_HOME"/bin/*.jar do if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then - CARBON_CLASSPATH="$CARBON_CLASSPATH":$f + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$f" + else + CARBON_CLASSPATH="$f" + fi fi done for t in "$CARBON_HOME"/lib/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done for t in "$CARBON_HOME"/lib/endorsed/*.jar do - CARBON_CLASSPATH="$CARBON_CLASSPATH":$t + if [ -n "$CARBON_CLASSPATH" ]; then + CARBON_CLASSPATH="$CARBON_CLASSPATH:$t" + else + CARBON_CLASSPATH="$t" + fi done